Process OAuth2 authorization on a mobile client and use credentials on a server?
See original GitHub issueIs it possible to process OAuth2 authorization using a mobile SDK client and then use retrieved credentials with google-api-dotnet-client API? So, I want to get credentials directly in a mobile client, send them to a backend and use API on the backend with this credentials.
I already find something in source code: https://github.com/flutter/plugins/blob/master/packages/google_sign_in/google_sign_in/lib/google_sign_in.dart#L108
So, should I send to a backend only an access_token
or it have to be something more?
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Using OAuth 2.0 for Web Server Applications | Authorization
Go to the Credentials page. Click Create credentials > OAuth client ID. Select the Web application application type. Fill in the form and...
Read more >What is OAuth 2.0 and what does it do for you?
Authorization Code grant: The Authorization server returns a single-use Authorization Code to the Client, which is then exchanged for an Access Token. ·...
Read more >What is OAuth and How Does it Work?
The OAuth 2.0 protocol defines four types of grants: Authorization Code, Client Credentials, Device Code and Refresh Token. The client then requests an...
Read more >OAuth 2.0 Client Credentials Flow for Server-to- ...
In this flow, the client app exchanges its client credentials defined in the connected app—its consumer key and consumer secret—for an access token....
Read more >OAuth 2.0 Authorization using Client Credentials
The authentication server authenticates the client using the client identifier issued to the client during the application registration process.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @rodion-m , glad I could help.
If you wanted to perform authentication natively, you can follow the steps in OAuth 2.0 for Mobile & Desktop Apps. I’d still advise you to use a supported library or similar.
For Flutter, here are Flutter’s docs. And aslo you can ask a question on one of their repos, browse their samples there, etc… I won’t be able to help here since I’m not familiar with Flutter at all.
I’ll be closing this issue now, since there’s not much we can do on our side. Of course, if you encounter any problems with the Google.Apis.Auth library or with the approach suggested, do open new issues.
@amanda-tarafa Thank you very much for such a detailed response! I’m glad to see so high level of users supporting from Google! So, now only one problem is left - retrieving a refresh token using google_sign_in flutter plugin or at least find it in native library. Who should I ask this question?