i5-Toolkit-for-Unity
i5-Toolkit-for-Unity copied to clipboard
OpenID Connect Client - redirect uri invalid request
Describe the bug I had followed this video to set up Google Sign In using i5 toolkit. And I followed the deep linking instruction to add i5 as scheme in AndroidManifest.xml.
And this is how I set the redirect uri:
But when I build the apk and try to sign in with Google, error message comes out:
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy for keeping apps secure.
And after clicking into the error details, it shows:
Error 400: invalid_request
redirect_uri=i5:/code?flowName=GeneralOAuthFlow
Expected behavior Showing the page for user to Google sign.
Screenshots
Bug Observed on the Following Build Targets Check applicable build targets by putting an x in-between the square brackets.
- [ ] Unity editor
- [ ] PC, Mac, Standalone
- [ ] Universal Windows Platform (UWP)
- [ ] iOS
- [x] Other (please specify): Android
For deployed applications, please provide information about the device on which the bug occurred Device name (e.g. Google Pixel): Xiaomi Mi Max 3 OS version (e.g. Android 11, iOS 14): Android 10
I'm facing a similar problem
OpenIDConnectService openIDConnectService = new OpenIDConnectService(); openIDConnectService.OidcProvider = new GoogleOidcProvider(); openIDConnectService.OidcProvider.ClientData = googleClientEditorDataObject.clientData; openIDConnectService.RedirectURI = "https://www.google.com"; openIDConnectService.ServerListener.ListeningUri = "http://127.0.0.1:52229/"; ServiceManager.RegisterService(openIDConnectService); ServiceManager.GetService<OpenIDConnectService>().OpenLoginPageAsync();
i remove redirect url to see what happends and it send by default on 62553 port so i change authorized url for http://127.0.0.1:62553/code? and openIDConnectService.ServerListener.ListeningUri = "http://127.0.0.1:62553/"; and it works i think it something wrong with port can be