How do I implement OAuth on a mobile device? Do I have to run a localhost server?

时间:2018-09-22 22:51:00

标签: android ios oauth-2.0 flutter

I'm a web developer and I've implemented Oauth a couple times. I would forward the user to a login screen on a third-party page, then it would send the user back to my server.

But I'm making an android app (using flutter) at the moment, and I'm confused. Do I do the same thing? Do I start a web server on the users phone, then send the user to a sign in page then let the server handle the user coming back?

These seems complex for an app. Or am I thinking of this wrong?

Extra:

On flutter, it's very frustrating because when the user finishes authenticating, they are taken back to my server and I now have to close the web browser for them... which is difficult to do since the in-app browsers don't run javascript where I can just run window.close(); in it.

0 个答案:

没有答案