AyogoHealth / cordova-plugin-oauth

Cordova plugin for performing OAuth login flows.
Apache License 2.0
24 stars 27 forks source link

Problem with redirect_uri #28

Open ccamusso opened 2 years ago

ccamusso commented 2 years ago

I have an App with this ID: com.myapp and I use this Google endpoint

let endpoint = 'https://accounts.google.com/o/oauth2/auth/identifier?' +
            '&response_type=permission id_token' +
            '&scope=email profile openid' +
            '&openid.realm' +
            '&include_granted_scopes=true' +
            '&client_id=XXXXXXXX.apps.googleusercontent.com' +
            '&fetch_basic_profile=true' +
            '&gsiwebsdk=2' +
            '&redirect_uri=com.myapp://oauth_callback';

The result is:

Error 404: invalid_request
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0
You can let the app developer know tht this app doesn't comply with one or more Google validation rules:
redirect_uri=com.myapp://oauth_callback

Can you help me to fix the problem?

miraclemaker commented 1 year ago

Google says the redirect uri needs to start with http:// or https:// https://developers.google.com/identity/protocols/oauth2/web-server#uri-validation So it looks like using a customer url scheme will no longer work. It needs to be set up using App Links / Universal Links.