capacitor-community / generic-oauth2

Generic Capacitor OAuth 2 client plugin. Stop the war in Ukraine!
MIT License
223 stars 106 forks source link

Problem opening native authenticator app #221

Open FabianMeul opened 1 year ago

FabianMeul commented 1 year ago

Description

I'm having trouble getting this package to open a native authenticator app for our OAuth2 provider.

The authorization URL in question is; https://idp.e2e.itsme.services/v2/authorization.

The above URL opens the native app when using;

The above URL opens in a new browser tab when using;

What can I do have the package open the native app instead of a new browser window?

Capacitor version:

Run npx cap doctor:

💊   Capacitor Doctor  💊

Latest Dependencies:

  @capacitor/cli: 4.4.0
  @capacitor/core: 4.4.0
  @capacitor/android: 4.4.0
  @capacitor/ios: 4.4.0

Installed Dependencies:

  @capacitor/cli: 4.3.0
  @capacitor/core: 4.3.0
  @capacitor/android: 4.3.0
  @capacitor/ios: 4.3.0

[success] iOS looking great! 👌

Library version:

OAuth Provider:

Your Plugin Configuration

{
    appId: appInfo?.id,
    authorizationBaseUrl: baseUrl + '/authorize',
    accessTokenEndpoint: baseUrl + '/token',
    scope: 'openid email profile',
    resourceUrl,
    logsEnabled: true,
    responseType: 'code',
    web: {
        appId: window.location.origin,
        redirectUrl: window.location.href,
        windowOptions: 'height=600, left=0, top=0',
      },
    android: {
        appId: appInfo?.id,
        redirectUrl: `${appInfo?.id}:/`,
    },
    ios: {
        appId: appInfo?.id,
        redirectUrl: `${appInfo?.id}:/`,
    },
}

Affected Platform(s):

ludvigbostromdizparc commented 1 year ago

I have the exact same problem. Did you found any solution to the problem?