Authentication system between a mobile app and a REST API

xuanbao · 2017-04-29 01:00:45 · 567 次点击    
这是一个分享于 2017-04-29 01:00:45 的资源,其中的信息可能已经有所发展或是发生改变。

Hello Gophers,

I'm currently developing a REST API that would receive user-related data from a mobile app to be inserted in a database. I was wondering what kind of (possibly simple) authentication system do you advise me to use in my REST API in this context.

Initially, I thought of storing credentials in the mobile app and sending them to the API, that would return a randomly generated token that would expire periodically, it's quite simple but I don't think it's very safe.

Thanks in advance for your advices!


评论:

metamatic:

Use OpenID Connect.

It's a subset of OAuth2. Whereas the OAuth2 standard leaves you with a ton of options, OpenID Connect picks out a subset of those options that will actually be secure.


入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

567 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传