capacitor-community / generic-oauth2

Generic Capacitor OAuth 2 client plugin. Stop the war in Ukraine!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem opening native authenticator app

FabianMeul opened this issue Β· comments

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;

  • <a href="" />
  • AppLauncher.openUrl({ url })

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

  • OAuth2Client.authenticate(options)

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:

  • 4.0.0

OAuth Provider:

  • Other: ItsMe

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):

  • Android
    • all
  • iOS
    • all

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