Description
According to the Mobile App Google documentation, there is a parameter named redirect_uri
which is not clear to me. For example, in the Web App flow of Google OAuth2, the procedure is some communication between front-end, back-end, and google server. In fact, the backend prepares two endpoints one for redirecting to the google auth page which will be called by the frontend, and another endpoint is /oauth2callback
which will be called by the google server as a redirect_uri
.
My question is, what's the redirect_uri
in the Mobile App flow? Is it the same with my backend /oath2callback
or Mobile App flow doesn't need any backend part?
Is the following procedure true? First, you create a web application credentials in google developer console, then use the client_id in both react native as well as backend side, next you create the /oath2callback
endpoint in the backend and use it as redirect_uri
in the native side?
[NOTE]:
Actually, I am going to receive credential stuff from the mobile side including access_token, refresh_token, etc, into the backend and store it into the db and use it for calling google API on the server side.
I also couldn't find rasing an issue in https://cloud.google.com/support/ !
[UPDATE]
Here's the flow I've implemented: