capacitor-oidc 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  import { CapacitorOidcError } from './errors.js';
2
+ import { WEB_ONLY_SETTINGS } from './user-manager-settings-policy.js';
2
3
  export function resolveConfiguration(configuration, platform) {
3
4
  if (platform === 'web')
4
5
  return resolveWebConfiguration(configuration);
@@ -61,7 +62,7 @@ function assertPublicClient(settings) {
61
62
  }
62
63
  }
63
64
  function assertNativeSettings(settings) {
64
- const unsupported = ['dpop', 'monitorSession', 'silent_redirect_uri', 'stateStore', 'userStore'].find((key) => key in settings);
65
+ const unsupported = WEB_ONLY_SETTINGS.find((key) => key in settings);
65
66
  if (unsupported) {
66
67
  throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', `Native configuration does not support ${unsupported}`);
67
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../src/configuration.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAcjD,MAAM,UAAU,oBAAoB,CAClC,aAAgD,EAChD,QAAyB;IAEzB,IAAI,QAAQ,KAAK,KAAK;QAAE,OAAO,uBAAuB,CAAC,aAAa,CAAC,CAAC;IACtE,OAAO,0BAA0B,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,QAAsC,EACtC,aAAyC,EACzC,QAAyB;IAEzB,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;QACvB,MAAM,IAAI,kBAAkB,CAC1B,qBAAqB,EACrB,4EAA4E,CAC7E,CAAC;IACJ,CAAC;IAED,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC7B,IAAI,MAAM,IAAI,QAAQ,EAAE,CAAC;QACvB,MAAM,IAAI,kBAAkB,CAAC,qBAAqB,EAAE,4CAA4C,CAAC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;IACF,IAAI,WAAW,EAAE,CAAC;QAChB,MAAM,IAAI,kBAAkB,CAAC,qBAAqB,EAAE,yCAAyC,WAAW,EAAE,CAAC,CAAC;IAC9G,CAAC;AACH,CAAC;AAED,SAAS,wBAAwB,CAAC,QAAyB;IACzD,MAAM,IAAI,kBAAkB,CAAC,qBAAqB,EAAE,MAAM,QAAQ,6BAA6B,CAAC,CAAC;AACnG,CAAC","sourcesContent":["import type { UserManagerSettings } from 'oidc-client-ts';\n\nimport type {\n CapacitorOidcNativeOptions,\n CapacitorSigninArgs,\n CapacitorSignoutArgs,\n CapacitorUserManagerConfiguration,\n CapacitorUserManagerSettings,\n} from './definitions.js';\nimport { CapacitorOidcError } from './errors.js';\n\nexport type RuntimePlatform = 'android' | 'ios' | 'web';\n\nexport interface ResolvedUserManagerConfiguration {\n platform: RuntimePlatform;\n settings: UserManagerSettings;\n nativeOptions?: CapacitorOidcNativeOptions;\n signinMode: 'popup' | 'redirect';\n signoutMode: 'popup' | 'redirect';\n signinArgs: CapacitorSigninArgs;\n signoutArgs: CapacitorSignoutArgs;\n}\n\nexport function resolveConfiguration(\n configuration: CapacitorUserManagerConfiguration,\n platform: RuntimePlatform,\n): ResolvedUserManagerConfiguration {\n if (platform === 'web') return resolveWebConfiguration(configuration);\n return resolveNativeConfiguration(configuration, platform);\n}\n\nexport function resolveLegacyNativeConfiguration(\n settings: CapacitorUserManagerSettings,\n nativeOptions: CapacitorOidcNativeOptions,\n platform: RuntimePlatform,\n): ResolvedUserManagerConfiguration {\n if (platform === 'web') {\n throw new CapacitorOidcError(\n 'UNSUPPORTED_RUNTIME',\n 'Legacy CapacitorUserManager settings are only supported on iOS and Android',\n );\n }\n\n assertPublicClient(settings);\n if ('dpop' in settings) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', 'Native configuration does not support dpop');\n }\n\n return resolvedNativeConfiguration(platform, settings, nativeOptions);\n}\n\nfunction resolveWebConfiguration(configuration: CapacitorUserManagerConfiguration): ResolvedUserManagerConfiguration {\n const web = configuration.web;\n if (!web) unsupportedConfiguration('web');\n\n const signoutMode = web.signoutMode ?? 'redirect';\n const settings: UserManagerSettings = { ...configuration.common, ...web.settings };\n assertPublicClient(settings);\n if (signoutMode === 'popup' && !settings.popup_post_logout_redirect_uri && !settings.post_logout_redirect_uri) {\n throw new CapacitorOidcError(\n 'UNSUPPORTED_RUNTIME',\n 'Web popup signout requires post_logout_redirect_uri or popup_post_logout_redirect_uri',\n );\n }\n\n return {\n platform: 'web',\n settings,\n signinMode: web.signinMode ?? 'redirect',\n signoutMode,\n signinArgs: web.signinArgs ?? {},\n signoutArgs: web.signoutArgs ?? {},\n };\n}\n\nfunction resolveNativeConfiguration(\n configuration: CapacitorUserManagerConfiguration,\n platform: 'android' | 'ios',\n): ResolvedUserManagerConfiguration {\n const native = configuration.native;\n if (!native) unsupportedConfiguration(platform);\n\n const override = configuration[platform];\n const settings = { ...configuration.common, ...native.settings, ...override?.settings };\n assertPublicClient(settings);\n assertNativeSettings(settings);\n\n return resolvedNativeConfiguration(\n platform,\n settings,\n { ...native.options, ...override?.options },\n { ...native.signinArgs, ...override?.signinArgs },\n { ...native.signoutArgs, ...override?.signoutArgs },\n );\n}\n\nfunction resolvedNativeConfiguration(\n platform: 'android' | 'ios',\n settings: UserManagerSettings,\n nativeOptions: CapacitorOidcNativeOptions,\n signinArgs: CapacitorSigninArgs = {},\n signoutArgs: CapacitorSignoutArgs = {},\n): ResolvedUserManagerConfiguration {\n return {\n platform,\n settings: { ...settings, response_type: 'code', disablePKCE: false, monitorSession: false },\n nativeOptions,\n signinMode: 'popup',\n signoutMode: 'popup',\n signinArgs,\n signoutArgs,\n };\n}\n\nfunction assertPublicClient(settings: object): void {\n const unsupported = ['client_authentication', 'client_secret', 'disablePKCE', 'response_type'].find(\n (key) => key in settings,\n );\n if (unsupported) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', `Public-client configuration does not support ${unsupported}`);\n }\n}\n\nfunction assertNativeSettings(settings: object): void {\n const unsupported = ['dpop', 'monitorSession', 'silent_redirect_uri', 'stateStore', 'userStore'].find(\n (key) => key in settings,\n );\n if (unsupported) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', `Native configuration does not support ${unsupported}`);\n }\n}\n\nfunction unsupportedConfiguration(platform: RuntimePlatform): never {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', `No ${platform} configuration was provided`);\n}\n"]}
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../src/configuration.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AActE,MAAM,UAAU,oBAAoB,CAClC,aAAgD,EAChD,QAAyB;IAEzB,IAAI,QAAQ,KAAK,KAAK;QAAE,OAAO,uBAAuB,CAAC,aAAa,CAAC,CAAC;IACtE,OAAO,0BAA0B,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,QAAsC,EACtC,aAAyC,EACzC,QAAyB;IAEzB,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;QACvB,MAAM,IAAI,kBAAkB,CAC1B,qBAAqB,EACrB,4EAA4E,CAC7E,CAAC;IACJ,CAAC;IAED,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC7B,IAAI,MAAM,IAAI,QAAQ,EAAE,CAAC;QACvB,MAAM,IAAI,kBAAkB,CAAC,qBAAqB,EAAE,4CAA4C,CAAC,CAAC;IACpG,CAAC;IAED,OAAO,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,uBAAuB,CAAC,aAAgD;IAC/E,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC;IAC9B,IAAI,CAAC,GAAG;QAAE,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAE1C,MAAM,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eOptions,\n CapacitorSigninArgs,\n CapacitorSignoutArgs,\n CapacitorUserManagerConfiguration,\n CapacitorUserManagerSettings,\n} from './definitions.js';\nimport { CapacitorOidcError } from './errors.js';\nimport { WEB_ONLY_SETTINGS } from './user-manager-settings-policy.js';\n\nexport type RuntimePlatform = 'android' | 'ios' | 'web';\n\nexport interface ResolvedUserManagerConfiguration {\n platform: RuntimePlatform;\n settings: UserManagerSettings;\n nativeOptions?: CapacitorOidcNativeOptions;\n signinMode: 'popup' | 'redirect';\n signoutMode: 'popup' | 'redirect';\n signinArgs: CapacitorSigninArgs;\n signoutArgs: CapacitorSignoutArgs;\n}\n\nexport function resolveConfiguration(\n configuration: CapacitorUserManagerConfiguration,\n platform: RuntimePlatform,\n): ResolvedUserManagerConfiguration {\n if (platform === 'web') return resolveWebConfiguration(configuration);\n return resolveNativeConfiguration(configuration, platform);\n}\n\nexport function resolveLegacyNativeConfiguration(\n settings: CapacitorUserManagerSettings,\n nativeOptions: CapacitorOidcNativeOptions,\n platform: RuntimePlatform,\n): ResolvedUserManagerConfiguration {\n if (platform === 'web') {\n throw new CapacitorOidcError(\n 'UNSUPPORTED_RUNTIME',\n 'Legacy CapacitorUserManager settings are only supported on iOS and Android',\n );\n }\n\n assertPublicClient(settings);\n if ('dpop' in settings) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', 'Native configuration does not support dpop');\n }\n\n return resolvedNativeConfiguration(platform, settings, nativeOptions);\n}\n\nfunction resolveWebConfiguration(configuration: CapacitorUserManagerConfiguration): ResolvedUserManagerConfiguration {\n const web = configuration.web;\n if (!web) unsupportedConfiguration('web');\n\n const signoutMode = web.signoutMode ?? 'redirect';\n const settings: UserManagerSettings = { ...configuration.common, ...web.settings };\n assertPublicClient(settings);\n if (signoutMode === 'popup' && !settings.popup_post_logout_redirect_uri && !settings.post_logout_redirect_uri) {\n throw new CapacitorOidcError(\n 'UNSUPPORTED_RUNTIME',\n 'Web popup signout requires post_logout_redirect_uri or popup_post_logout_redirect_uri',\n );\n }\n\n return {\n platform: 'web',\n settings,\n signinMode: web.signinMode ?? 'redirect',\n signoutMode,\n signinArgs: web.signinArgs ?? {},\n signoutArgs: web.signoutArgs ?? {},\n };\n}\n\nfunction resolveNativeConfiguration(\n configuration: CapacitorUserManagerConfiguration,\n platform: 'android' | 'ios',\n): ResolvedUserManagerConfiguration {\n const native = configuration.native;\n if (!native) unsupportedConfiguration(platform);\n\n const override = configuration[platform];\n const settings = { ...configuration.common, ...native.settings, ...override?.settings };\n assertPublicClient(settings);\n assertNativeSettings(settings);\n\n return resolvedNativeConfiguration(\n platform,\n settings,\n { ...native.options, ...override?.options },\n { ...native.signinArgs, ...override?.signinArgs },\n { ...native.signoutArgs, ...override?.signoutArgs },\n );\n}\n\nfunction resolvedNativeConfiguration(\n platform: 'android' | 'ios',\n settings: UserManagerSettings,\n nativeOptions: CapacitorOidcNativeOptions,\n signinArgs: CapacitorSigninArgs = {},\n signoutArgs: CapacitorSignoutArgs = {},\n): ResolvedUserManagerConfiguration {\n return {\n platform,\n settings: { ...settings, response_type: 'code', disablePKCE: false, monitorSession: false },\n nativeOptions,\n signinMode: 'popup',\n signoutMode: 'popup',\n signinArgs,\n signoutArgs,\n };\n}\n\nfunction assertPublicClient(settings: object): void {\n const unsupported = ['client_authentication', 'client_secret', 'disablePKCE', 'response_type'].find(\n (key) => key in settings,\n );\n if (unsupported) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', `Public-client configuration does not support ${unsupported}`);\n }\n}\n\nfunction assertNativeSettings(settings: object): void {\n const unsupported = WEB_ONLY_SETTINGS.find((key) => key in settings);\n if (unsupported) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', `Native configuration does not support ${unsupported}`);\n }\n}\n\nfunction unsupportedConfiguration(platform: RuntimePlatform): never {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', `No ${platform} configuration was provided`);\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import type { SigninPopupArgs, SigninRedirectArgs, SignoutPopupArgs, SignoutRedirectArgs, UserManagerSettings } from 'oidc-client-ts';
2
+ import type { WebOnlySetting } from './user-manager-settings-policy.js';
2
3
  export type CapacitorOidcErrorCode = 'AUTH_SESSION_IN_PROGRESS' | 'USER_CANCELLED' | 'BROWSER_UNAVAILABLE' | 'INVALID_CALLBACK' | 'SECURE_STORAGE_ERROR' | 'UNSUPPORTED_RUNTIME';
3
4
  export interface IOSNativeOptions {
4
5
  keychainAccessGroup?: string;
@@ -11,12 +12,11 @@ export interface CapacitorOidcNativeOptions {
11
12
  }
12
13
  type UnsafePublicClientSettings = 'client_secret' | 'client_authentication' | 'disablePKCE' | 'response_type';
13
14
  type LegacyUnsupportedSettings = UnsafePublicClientSettings | 'dpop' | 'monitorSession' | 'silent_redirect_uri' | 'stateStore' | 'userStore';
14
- type WebOnlySettings = 'checkSessionIntervalInSeconds' | 'dpop' | 'iframeNotifyParentOrigin' | 'iframeScriptOrigin' | 'includeIdTokenInSilentSignout' | 'monitorAnonymousSession' | 'monitorSession' | 'popup_post_logout_redirect_uri' | 'popup_redirect_uri' | 'popupWindowFeatures' | 'popupWindowTarget' | 'query_status_response_type' | 'redirectMethod' | 'redirectTarget' | 'silent_redirect_uri' | 'silentRequestTimeoutInSeconds' | 'stateStore' | 'stopCheckSessionOnError' | 'userStore';
15
15
  type PublicClientUserManagerSettings = Omit<UserManagerSettings, UnsafePublicClientSettings>;
16
- type NativeUserManagerSettings = Omit<PublicClientUserManagerSettings, WebOnlySettings>;
16
+ type NativeUserManagerSettings = Omit<PublicClientUserManagerSettings, WebOnlySetting>;
17
17
  /** @deprecated Use CapacitorUserManagerConfiguration. */
18
18
  export type CapacitorUserManagerSettings = Omit<UserManagerSettings, LegacyUnsupportedSettings>;
19
- export type CapacitorUserManagerCommonSettings = Omit<PublicClientUserManagerSettings, WebOnlySettings | 'post_logout_redirect_uri' | 'redirect_uri'>;
19
+ export type CapacitorUserManagerCommonSettings = Omit<PublicClientUserManagerSettings, WebOnlySetting | 'post_logout_redirect_uri' | 'redirect_uri'>;
20
20
  export type CapacitorWebUserManagerSettings = Partial<Omit<PublicClientUserManagerSettings, 'redirect_uri'>> & {
21
21
  redirect_uri: string;
22
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n SigninPopupArgs,\n SigninRedirectArgs,\n SignoutPopupArgs,\n SignoutRedirectArgs,\n UserManagerSettings,\n} from 'oidc-client-ts';\n\nexport type CapacitorOidcErrorCode =\n | 'AUTH_SESSION_IN_PROGRESS'\n | 'USER_CANCELLED'\n | 'BROWSER_UNAVAILABLE'\n | 'INVALID_CALLBACK'\n | 'SECURE_STORAGE_ERROR'\n | 'UNSUPPORTED_RUNTIME';\n\nexport interface IOSNativeOptions {\n keychainAccessGroup?: string;\n keychainAccessibility?: 'afterFirstUnlockThisDeviceOnly' | 'whenUnlockedThisDeviceOnly';\n}\n\nexport interface CapacitorOidcNativeOptions {\n ios?: IOSNativeOptions;\n prefersEphemeralWebBrowserSession?: boolean;\n storageNamespace?: string;\n}\n\ntype UnsafePublicClientSettings = 'client_secret' | 'client_authentication' | 'disablePKCE' | 'response_type';\n\ntype LegacyUnsupportedSettings =\n | UnsafePublicClientSettings\n | 'dpop'\n | 'monitorSession'\n | 'silent_redirect_uri'\n | 'stateStore'\n | 'userStore';\n\ntype WebOnlySettings =\n | 'checkSessionIntervalInSeconds'\n | 'dpop'\n | 'iframeNotifyParentOrigin'\n | 'iframeScriptOrigin'\n | 'includeIdTokenInSilentSignout'\n | 'monitorAnonymousSession'\n | 'monitorSession'\n | 'popup_post_logout_redirect_uri'\n | 'popup_redirect_uri'\n | 'popupWindowFeatures'\n | 'popupWindowTarget'\n | 'query_status_response_type'\n | 'redirectMethod'\n | 'redirectTarget'\n | 'silent_redirect_uri'\n | 'silentRequestTimeoutInSeconds'\n | 'stateStore'\n | 'stopCheckSessionOnError'\n | 'userStore';\n\ntype PublicClientUserManagerSettings = Omit<UserManagerSettings, UnsafePublicClientSettings>;\ntype NativeUserManagerSettings = Omit<PublicClientUserManagerSettings, WebOnlySettings>;\n\n/** @deprecated Use CapacitorUserManagerConfiguration. */\nexport type CapacitorUserManagerSettings = Omit<UserManagerSettings, LegacyUnsupportedSettings>;\n\nexport type CapacitorUserManagerCommonSettings = Omit<\n PublicClientUserManagerSettings,\n WebOnlySettings | 'post_logout_redirect_uri' | 'redirect_uri'\n>;\n\nexport type CapacitorWebUserManagerSettings = Partial<Omit<PublicClientUserManagerSettings, 'redirect_uri'>> & {\n redirect_uri: string;\n};\n\nexport type CapacitorNativeUserManagerSettings = Partial<Omit<NativeUserManagerSettings, 'redirect_uri'>> & {\n redirect_uri: string;\n};\n\nexport type CapacitorSigninArgs = SigninPopupArgs & SigninRedirectArgs;\nexport type CapacitorSignoutArgs = SignoutPopupArgs & SignoutRedirectArgs;\n\ninterface CapacitorWebUserManagerConfigurationBase {\n settings: CapacitorWebUserManagerSettings;\n signinMode?: 'popup' | 'redirect';\n signinArgs?: CapacitorSigninArgs;\n signoutArgs?: CapacitorSignoutArgs;\n}\n\ntype PopupSignoutSettings = CapacitorWebUserManagerSettings &\n ({ popup_post_logout_redirect_uri: string } | { post_logout_redirect_uri: string });\n\nexport type CapacitorWebUserManagerConfiguration =\n | (CapacitorWebUserManagerConfigurationBase & {\n signoutMode: 'popup';\n settings: PopupSignoutSettings;\n })\n | (CapacitorWebUserManagerConfigurationBase & {\n signoutMode?: 'redirect';\n });\n\nexport interface CapacitorNativeUserManagerConfiguration {\n settings: CapacitorNativeUserManagerSettings;\n options?: CapacitorOidcNativeOptions;\n signinArgs?: CapacitorSigninArgs;\n signoutArgs?: CapacitorSignoutArgs;\n}\n\nexport interface CapacitorNativeUserManagerOverride {\n settings?: Partial<CapacitorNativeUserManagerSettings>;\n options?: CapacitorOidcNativeOptions;\n signinArgs?: CapacitorSigninArgs;\n signoutArgs?: CapacitorSignoutArgs;\n}\n\nexport interface CapacitorUserManagerConfiguration {\n common: CapacitorUserManagerCommonSettings;\n web?: CapacitorWebUserManagerConfiguration;\n native?: CapacitorNativeUserManagerConfiguration;\n ios?: CapacitorNativeUserManagerOverride;\n android?: CapacitorNativeUserManagerOverride;\n}\n\nexport interface StoredSessionV1 {\n version: 1;\n issuer: string;\n clientId: string;\n accessToken: string;\n refreshToken?: string;\n idToken?: string;\n tokenType: string;\n scope?: string;\n expiresAt?: number;\n}\n\nexport interface NativeOpenOptions {\n url: string;\n callbackUrl: string;\n prefersEphemeralWebBrowserSession: boolean;\n}\n\nexport interface NativeStorageOptions {\n namespace: string;\n key: string;\n}\n\nexport interface CapacitorOidcPlugin {\n configure(options: IOSNativeOptions): Promise<void>;\n open(options: NativeOpenOptions): Promise<{ url: string }>;\n cancel(): Promise<void>;\n storageSet(options: NativeStorageOptions & { value: string }): Promise<void>;\n storageGet(options: NativeStorageOptions): Promise<{ value: string | null }>;\n storageRemove(options: NativeStorageOptions): Promise<{ value: string | null }>;\n storageGetAllKeys(options: { namespace: string }): Promise<{ keys: string[] }>;\n setSessionSnapshot(options: { namespace: string; value: string | null }): Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n SigninPopupArgs,\n SigninRedirectArgs,\n SignoutPopupArgs,\n SignoutRedirectArgs,\n UserManagerSettings,\n} from 'oidc-client-ts';\n\nimport type { WebOnlySetting } from './user-manager-settings-policy.js';\n\nexport type CapacitorOidcErrorCode =\n | 'AUTH_SESSION_IN_PROGRESS'\n | 'USER_CANCELLED'\n | 'BROWSER_UNAVAILABLE'\n | 'INVALID_CALLBACK'\n | 'SECURE_STORAGE_ERROR'\n | 'UNSUPPORTED_RUNTIME';\n\nexport interface IOSNativeOptions {\n keychainAccessGroup?: string;\n keychainAccessibility?: 'afterFirstUnlockThisDeviceOnly' | 'whenUnlockedThisDeviceOnly';\n}\n\nexport interface CapacitorOidcNativeOptions {\n ios?: IOSNativeOptions;\n prefersEphemeralWebBrowserSession?: boolean;\n storageNamespace?: string;\n}\n\ntype UnsafePublicClientSettings = 'client_secret' | 'client_authentication' | 'disablePKCE' | 'response_type';\n\ntype LegacyUnsupportedSettings =\n | UnsafePublicClientSettings\n | 'dpop'\n | 'monitorSession'\n | 'silent_redirect_uri'\n | 'stateStore'\n | 'userStore';\n\ntype PublicClientUserManagerSettings = Omit<UserManagerSettings, UnsafePublicClientSettings>;\ntype NativeUserManagerSettings = Omit<PublicClientUserManagerSettings, WebOnlySetting>;\n\n/** @deprecated Use CapacitorUserManagerConfiguration. */\nexport type CapacitorUserManagerSettings = Omit<UserManagerSettings, LegacyUnsupportedSettings>;\n\nexport type CapacitorUserManagerCommonSettings = Omit<\n PublicClientUserManagerSettings,\n WebOnlySetting | 'post_logout_redirect_uri' | 'redirect_uri'\n>;\n\nexport type CapacitorWebUserManagerSettings = Partial<Omit<PublicClientUserManagerSettings, 'redirect_uri'>> & {\n redirect_uri: string;\n};\n\nexport type CapacitorNativeUserManagerSettings = Partial<Omit<NativeUserManagerSettings, 'redirect_uri'>> & {\n redirect_uri: string;\n};\n\nexport type CapacitorSigninArgs = SigninPopupArgs & SigninRedirectArgs;\nexport type CapacitorSignoutArgs = SignoutPopupArgs & SignoutRedirectArgs;\n\ninterface CapacitorWebUserManagerConfigurationBase {\n settings: CapacitorWebUserManagerSettings;\n signinMode?: 'popup' | 'redirect';\n signinArgs?: CapacitorSigninArgs;\n signoutArgs?: CapacitorSignoutArgs;\n}\n\ntype PopupSignoutSettings = CapacitorWebUserManagerSettings &\n ({ popup_post_logout_redirect_uri: string } | { post_logout_redirect_uri: string });\n\nexport type CapacitorWebUserManagerConfiguration =\n | (CapacitorWebUserManagerConfigurationBase & {\n signoutMode: 'popup';\n settings: PopupSignoutSettings;\n })\n | (CapacitorWebUserManagerConfigurationBase & {\n signoutMode?: 'redirect';\n });\n\nexport interface CapacitorNativeUserManagerConfiguration {\n settings: CapacitorNativeUserManagerSettings;\n options?: CapacitorOidcNativeOptions;\n signinArgs?: CapacitorSigninArgs;\n signoutArgs?: CapacitorSignoutArgs;\n}\n\nexport interface CapacitorNativeUserManagerOverride {\n settings?: Partial<CapacitorNativeUserManagerSettings>;\n options?: CapacitorOidcNativeOptions;\n signinArgs?: CapacitorSigninArgs;\n signoutArgs?: CapacitorSignoutArgs;\n}\n\nexport interface CapacitorUserManagerConfiguration {\n common: CapacitorUserManagerCommonSettings;\n web?: CapacitorWebUserManagerConfiguration;\n native?: CapacitorNativeUserManagerConfiguration;\n ios?: CapacitorNativeUserManagerOverride;\n android?: CapacitorNativeUserManagerOverride;\n}\n\nexport interface StoredSessionV1 {\n version: 1;\n issuer: string;\n clientId: string;\n accessToken: string;\n refreshToken?: string;\n idToken?: string;\n tokenType: string;\n scope?: string;\n expiresAt?: number;\n}\n\nexport interface NativeOpenOptions {\n url: string;\n callbackUrl: string;\n prefersEphemeralWebBrowserSession: boolean;\n}\n\nexport interface NativeStorageOptions {\n namespace: string;\n key: string;\n}\n\nexport interface CapacitorOidcPlugin {\n configure(options: IOSNativeOptions): Promise<void>;\n open(options: NativeOpenOptions): Promise<{ url: string }>;\n cancel(): Promise<void>;\n storageSet(options: NativeStorageOptions & { value: string }): Promise<void>;\n storageGet(options: NativeStorageOptions): Promise<{ value: string | null }>;\n storageRemove(options: NativeStorageOptions): Promise<{ value: string | null }>;\n storageGetAllKeys(options: { namespace: string }): Promise<{ keys: string[] }>;\n setSessionSnapshot(options: { namespace: string; value: string | null }): Promise<void>;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const WEB_ONLY_SETTINGS: readonly ["checkSessionIntervalInSeconds", "dpop", "iframeNotifyParentOrigin", "iframeScriptOrigin", "includeIdTokenInSilentSignout", "monitorAnonymousSession", "monitorSession", "popup_post_logout_redirect_uri", "popup_redirect_uri", "popupWindowFeatures", "popupWindowTarget", "query_status_response_type", "redirectMethod", "redirectTarget", "silent_redirect_uri", "silentRequestTimeoutInSeconds", "stateStore", "stopCheckSessionOnError", "userStore"];
2
+ export type WebOnlySetting = (typeof WEB_ONLY_SETTINGS)[number];
@@ -0,0 +1,22 @@
1
+ export const WEB_ONLY_SETTINGS = [
2
+ 'checkSessionIntervalInSeconds',
3
+ 'dpop',
4
+ 'iframeNotifyParentOrigin',
5
+ 'iframeScriptOrigin',
6
+ 'includeIdTokenInSilentSignout',
7
+ 'monitorAnonymousSession',
8
+ 'monitorSession',
9
+ 'popup_post_logout_redirect_uri',
10
+ 'popup_redirect_uri',
11
+ 'popupWindowFeatures',
12
+ 'popupWindowTarget',
13
+ 'query_status_response_type',
14
+ 'redirectMethod',
15
+ 'redirectTarget',
16
+ 'silent_redirect_uri',
17
+ 'silentRequestTimeoutInSeconds',
18
+ 'stateStore',
19
+ 'stopCheckSessionOnError',
20
+ 'userStore',
21
+ ];
22
+ //# sourceMappingURL=user-manager-settings-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-manager-settings-policy.js","sourceRoot":"","sources":["../../src/user-manager-settings-policy.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,+BAA+B;IAC/B,MAAM;IACN,0BAA0B;IAC1B,oBAAoB;IACpB,+BAA+B;IAC/B,yBAAyB;IACzB,gBAAgB;IAChB,gCAAgC;IAChC,oBAAoB;IACpB,qBAAqB;IACrB,mBAAmB;IACnB,4BAA4B;IAC5B,gBAAgB;IAChB,gBAAgB;IAChB,qBAAqB;IACrB,+BAA+B;IAC/B,YAAY;IACZ,yBAAyB;IACzB,WAAW;CACH,CAAC","sourcesContent":["export const WEB_ONLY_SETTINGS = [\n 'checkSessionIntervalInSeconds',\n 'dpop',\n 'iframeNotifyParentOrigin',\n 'iframeScriptOrigin',\n 'includeIdTokenInSilentSignout',\n 'monitorAnonymousSession',\n 'monitorSession',\n 'popup_post_logout_redirect_uri',\n 'popup_redirect_uri',\n 'popupWindowFeatures',\n 'popupWindowTarget',\n 'query_status_response_type',\n 'redirectMethod',\n 'redirectTarget',\n 'silent_redirect_uri',\n 'silentRequestTimeoutInSeconds',\n 'stateStore',\n 'stopCheckSessionOnError',\n 'userStore',\n] as const;\n\nexport type WebOnlySetting = (typeof WEB_ONLY_SETTINGS)[number];\n"]}
package/dist/plugin.cjs CHANGED
@@ -118,6 +118,28 @@ class BaseCapacitorUserManager extends oidcClientTs.UserManager {
118
118
  }
119
119
  }
120
120
 
121
+ const WEB_ONLY_SETTINGS = [
122
+ 'checkSessionIntervalInSeconds',
123
+ 'dpop',
124
+ 'iframeNotifyParentOrigin',
125
+ 'iframeScriptOrigin',
126
+ 'includeIdTokenInSilentSignout',
127
+ 'monitorAnonymousSession',
128
+ 'monitorSession',
129
+ 'popup_post_logout_redirect_uri',
130
+ 'popup_redirect_uri',
131
+ 'popupWindowFeatures',
132
+ 'popupWindowTarget',
133
+ 'query_status_response_type',
134
+ 'redirectMethod',
135
+ 'redirectTarget',
136
+ 'silent_redirect_uri',
137
+ 'silentRequestTimeoutInSeconds',
138
+ 'stateStore',
139
+ 'stopCheckSessionOnError',
140
+ 'userStore',
141
+ ];
142
+
121
143
  function resolveConfiguration(configuration, platform) {
122
144
  if (platform === 'web')
123
145
  return resolveWebConfiguration(configuration);
@@ -180,7 +202,7 @@ function assertPublicClient(settings) {
180
202
  }
181
203
  }
182
204
  function assertNativeSettings(settings) {
183
- const unsupported = ['dpop', 'monitorSession', 'silent_redirect_uri', 'stateStore', 'userStore'].find((key) => key in settings);
205
+ const unsupported = WEB_ONLY_SETTINGS.find((key) => key in settings);
184
206
  if (unsupported) {
185
207
  throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', `Native configuration does not support ${unsupported}`);
186
208
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs","sources":["esm/errors.js","esm/base-capacitor-user-manager.js","esm/configuration.js","esm/capacitor-user-manager.js","esm/native.js","esm/capacitor-navigator.js","esm/capacitor-secure-state-store.js","esm/native-capacitor-user-manager.js","esm/web-capacitor-user-manager.js","esm/index.js"],"sourcesContent":["export class CapacitorOidcError extends Error {\n code;\n constructor(code, message) {\n super(message);\n this.code = code;\n this.name = 'CapacitorOidcError';\n }\n}\nexport function unsupported(feature) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', `${feature} is not available in a native Capacitor runtime`);\n}\n//# sourceMappingURL=errors.js.map","import { UserManager, } from 'oidc-client-ts';\nimport { unsupported } from './errors.js';\nexport class BaseCapacitorUserManager extends UserManager {\n automaticRenewalPromise;\n refreshPromise;\n signinMode;\n signoutMode;\n defaultSigninArgs;\n defaultSignoutArgs;\n constructor(configuration, redirectNavigator, popupNavigator, iframeNavigator) {\n super(configuration.settings, redirectNavigator, popupNavigator, iframeNavigator);\n this.signinMode = configuration.signinMode;\n this.signoutMode = configuration.signoutMode;\n this.defaultSigninArgs = configuration.signinArgs;\n this.defaultSignoutArgs = configuration.signoutArgs;\n }\n async initialize() {\n await this.getUser();\n }\n async signin(args = {}) {\n const mergedArgs = { ...this.defaultSigninArgs, ...args };\n if (this.signinMode === 'redirect')\n return this.signinRedirect(mergedArgs);\n await this.signinPopup(mergedArgs);\n }\n async signout(args = {}) {\n const mergedArgs = { ...this.defaultSignoutArgs, ...args };\n if (this.signoutMode === 'redirect')\n return this.signoutRedirect(mergedArgs);\n await this.signoutPopup(mergedArgs);\n }\n async getValidUser(minimumValiditySeconds = 60) {\n const user = await this.getUser();\n if (!user)\n return null;\n if (user.expires_in === undefined || user.expires_in > minimumValiditySeconds)\n return user;\n return this.signinSilent();\n }\n async signinPopup(args = {}) {\n await this.waitForRenewal();\n return super.signinPopup(args);\n }\n async signoutPopup(args = {}) {\n await this.waitForRenewal();\n await super.signoutPopup(args);\n }\n async signinRedirect(args = {}) {\n await this.waitForRenewal();\n await super.signinRedirect(args);\n }\n async signoutRedirect(args = {}) {\n await this.waitForRenewal();\n await super.signoutRedirect(args);\n }\n signinSilent(args = {}) {\n if (!this.refreshPromise) {\n const refresh = this.performSilentSignin(args);\n this.refreshPromise = refresh.finally(() => {\n this.refreshPromise = undefined;\n });\n }\n return this.refreshPromise;\n }\n async signinResourceOwnerCredentials(_args) {\n unsupported('Resource Owner Password Credentials');\n }\n async removeUser() {\n await this.waitForRenewal();\n await this.removeUserWithoutWaiting();\n }\n cancel() {\n return Promise.resolve();\n }\n async dispose() {\n this.stopSilentRenew();\n await this.disposePlatform();\n await this.waitForRenewal();\n await this.cancel();\n }\n performSilentSignin(args) {\n return super.signinSilent(args);\n }\n removeUserWithoutWaiting() {\n return super.removeUser();\n }\n checkForAutomaticRenewal() {\n if (!this.settings.automaticSilentRenew || this.automaticRenewalPromise)\n return;\n const renewal = this.getValidUser();\n this.automaticRenewalPromise = renewal;\n void renewal\n .catch((error) => this.events._raiseSilentRenewError(error instanceof Error ? error : new Error('Silent renewal failed')))\n .finally(() => {\n if (this.automaticRenewalPromise === renewal)\n this.automaticRenewalPromise = undefined;\n });\n }\n async waitForRenewal() {\n await this.automaticRenewalPromise?.catch(() => undefined);\n await this.refreshPromise?.catch(() => undefined);\n }\n}\n//# sourceMappingURL=base-capacitor-user-manager.js.map","import { CapacitorOidcError } from './errors.js';\nexport function resolveConfiguration(configuration, platform) {\n if (platform === 'web')\n return resolveWebConfiguration(configuration);\n return resolveNativeConfiguration(configuration, platform);\n}\nexport function resolveLegacyNativeConfiguration(settings, nativeOptions, platform) {\n if (platform === 'web') {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', 'Legacy CapacitorUserManager settings are only supported on iOS and Android');\n }\n assertPublicClient(settings);\n if ('dpop' in settings) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', 'Native configuration does not support dpop');\n }\n return resolvedNativeConfiguration(platform, settings, nativeOptions);\n}\nfunction resolveWebConfiguration(configuration) {\n const web = configuration.web;\n if (!web)\n unsupportedConfiguration('web');\n const signoutMode = web.signoutMode ?? 'redirect';\n const settings = { ...configuration.common, ...web.settings };\n assertPublicClient(settings);\n if (signoutMode === 'popup' && !settings.popup_post_logout_redirect_uri && !settings.post_logout_redirect_uri) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', 'Web popup signout requires post_logout_redirect_uri or popup_post_logout_redirect_uri');\n }\n return {\n platform: 'web',\n settings,\n signinMode: web.signinMode ?? 'redirect',\n signoutMode,\n signinArgs: web.signinArgs ?? {},\n signoutArgs: web.signoutArgs ?? {},\n };\n}\nfunction resolveNativeConfiguration(configuration, platform) {\n const native = configuration.native;\n if (!native)\n unsupportedConfiguration(platform);\n const override = configuration[platform];\n const settings = { ...configuration.common, ...native.settings, ...override?.settings };\n assertPublicClient(settings);\n assertNativeSettings(settings);\n return resolvedNativeConfiguration(platform, settings, { ...native.options, ...override?.options }, { ...native.signinArgs, ...override?.signinArgs }, { ...native.signoutArgs, ...override?.signoutArgs });\n}\nfunction resolvedNativeConfiguration(platform, settings, nativeOptions, signinArgs = {}, signoutArgs = {}) {\n return {\n platform,\n settings: { ...settings, response_type: 'code', disablePKCE: false, monitorSession: false },\n nativeOptions,\n signinMode: 'popup',\n signoutMode: 'popup',\n signinArgs,\n signoutArgs,\n };\n}\nfunction assertPublicClient(settings) {\n const unsupported = ['client_authentication', 'client_secret', 'disablePKCE', 'response_type'].find((key) => key in settings);\n if (unsupported) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', `Public-client configuration does not support ${unsupported}`);\n }\n}\nfunction assertNativeSettings(settings) {\n const unsupported = ['dpop', 'monitorSession', 'silent_redirect_uri', 'stateStore', 'userStore'].find((key) => key in settings);\n if (unsupported) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', `Native configuration does not support ${unsupported}`);\n }\n}\nfunction unsupportedConfiguration(platform) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', `No ${platform} configuration was provided`);\n}\n//# sourceMappingURL=configuration.js.map","import { Capacitor } from '@capacitor/core';\nimport { BaseCapacitorUserManager } from './base-capacitor-user-manager.js';\nimport { resolveConfiguration, resolveLegacyNativeConfiguration, } from './configuration.js';\nimport { CapacitorOidcError } from './errors.js';\nexport class CapacitorUserManager extends BaseCapacitorUserManager {\n static async create(configuration, nativeOptions = {}) {\n assertRuntime();\n const platform = currentPlatform();\n const resolved = 'redirect_uri' in configuration\n ? resolveLegacyNativeConfiguration(configuration, nativeOptions, platform)\n : resolveConfiguration(configuration, platform);\n const manager = await platformUserManagerFactory(resolved);\n await manager.initialize();\n return manager;\n }\n}\nlet platformUserManagerFactory;\nexport function setPlatformUserManagerFactory(factory) {\n platformUserManagerFactory = factory;\n}\nfunction currentPlatform() {\n const platform = Capacitor.getPlatform();\n return platform === 'ios' || platform === 'android' ? platform : 'web';\n}\nfunction assertRuntime() {\n if (!globalThis.crypto?.subtle || !globalThis.crypto.getRandomValues) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', 'Web Crypto is required by oidc-client-ts');\n }\n}\n//# sourceMappingURL=capacitor-user-manager.js.map","import { registerPlugin } from '@capacitor/core';\nexport const NativeOidc = registerPlugin('CapacitorOidc');\n//# sourceMappingURL=native.js.map","import { CapacitorOidcError, unsupported } from './errors.js';\nimport { NativeOidc } from './native.js';\nexport class CapacitorNavigator {\n prefersEphemeralWebBrowserSession;\n constructor(prefersEphemeralWebBrowserSession) {\n this.prefersEphemeralWebBrowserSession = prefersEphemeralWebBrowserSession;\n }\n async prepare() {\n return new CapacitorWindow(this.prefersEphemeralWebBrowserSession);\n }\n async callback() {\n unsupported('Navigator callbacks');\n }\n}\nclass CapacitorWindow {\n prefersEphemeralWebBrowserSession;\n constructor(prefersEphemeralWebBrowserSession) {\n this.prefersEphemeralWebBrowserSession = prefersEphemeralWebBrowserSession;\n }\n async navigate({ url }) {\n assertSecureRequestUrl(url);\n const callbackUrl = callbackUrlFromRequest(url);\n const response = await NativeOidc.open({\n url,\n callbackUrl,\n prefersEphemeralWebBrowserSession: this.prefersEphemeralWebBrowserSession,\n });\n if (!isExpectedCallback(response.url, callbackUrl)) {\n throw new CapacitorOidcError('INVALID_CALLBACK', 'The authentication callback does not match the configured redirect URI');\n }\n return response;\n }\n close() {\n void NativeOidc.cancel();\n }\n}\nexport function assertSecureRequestUrl(requestUrl) {\n const url = new URL(requestUrl);\n const isHttpLoopback = url.protocol === 'http:' &&\n (url.hostname === 'localhost' || url.hostname === '127.0.0.1' || url.hostname === '[::1]');\n if (url.protocol !== 'https:' && !isHttpLoopback) {\n throw new CapacitorOidcError('BROWSER_UNAVAILABLE', 'OIDC authorization and logout endpoints must use HTTPS');\n }\n}\nexport function callbackUrlFromRequest(requestUrl) {\n const url = new URL(requestUrl);\n const callback = url.searchParams.get('post_logout_redirect_uri') ??\n url.searchParams.get('logout_uri') ??\n url.searchParams.get('redirect_uri');\n if (!callback) {\n throw new CapacitorOidcError('INVALID_CALLBACK', 'The OIDC request does not contain a callback URI');\n }\n return callback;\n}\nexport function isExpectedCallback(actualValue, expectedValue) {\n const actual = new URL(actualValue);\n const expected = new URL(expectedValue);\n return (actual.protocol.toLowerCase() === expected.protocol.toLowerCase() &&\n actual.host.toLowerCase() === expected.host.toLowerCase() &&\n actual.pathname === expected.pathname);\n}\nexport class UnsupportedIframeNavigator {\n async prepare() {\n unsupported('Iframe navigation');\n }\n async callback() {\n unsupported('Iframe navigation');\n }\n}\n//# sourceMappingURL=capacitor-navigator.js.map","import { NativeOidc } from './native.js';\nexport class CapacitorSecureStateStore {\n namespace;\n constructor(namespace) {\n this.namespace = namespace;\n }\n async set(key, value) {\n await NativeOidc.storageSet({ namespace: this.namespace, key, value });\n }\n async get(key) {\n return (await NativeOidc.storageGet({ namespace: this.namespace, key })).value;\n }\n async remove(key) {\n return (await NativeOidc.storageRemove({ namespace: this.namespace, key })).value;\n }\n async getAllKeys() {\n return (await NativeOidc.storageGetAllKeys({ namespace: this.namespace })).keys;\n }\n}\n//# sourceMappingURL=capacitor-secure-state-store.js.map","import { App } from '@capacitor/app';\nimport { ErrorResponse, } from 'oidc-client-ts';\nimport { CapacitorNavigator, UnsupportedIframeNavigator } from './capacitor-navigator.js';\nimport { CapacitorSecureStateStore } from './capacitor-secure-state-store.js';\nimport { CapacitorUserManager } from './capacitor-user-manager.js';\nimport { unsupported } from './errors.js';\nimport { NativeOidc } from './native.js';\nexport class NativeCapacitorUserManager extends CapacitorUserManager {\n appStateListener;\n storageNamespace;\n constructor(configuration) {\n const storageNamespace = configuration.nativeOptions?.storageNamespace ?? 'default';\n const stateStore = new CapacitorSecureStateStore(`${storageNamespace}.transactions`);\n const userStore = new CapacitorSecureStateStore(`${storageNamespace}.session`);\n const navigator = new CapacitorNavigator(configuration.nativeOptions?.prefersEphemeralWebBrowserSession ?? false);\n super({\n ...configuration,\n settings: {\n ...configuration.settings,\n popup_redirect_uri: configuration.settings.redirect_uri,\n popup_post_logout_redirect_uri: configuration.settings.post_logout_redirect_uri,\n stateStore,\n userStore,\n },\n }, navigator, navigator, new UnsupportedIframeNavigator());\n this.storageNamespace = storageNamespace;\n }\n static async fromConfiguration(configuration) {\n await NativeOidc.configure(configuration.nativeOptions?.ios ?? {});\n return new NativeCapacitorUserManager(configuration);\n }\n async initialize() {\n await super.initialize();\n this.appStateListener = await App.addListener('appStateChange', ({ isActive }) => {\n if (isActive)\n this.checkForAutomaticRenewal();\n });\n this.checkForAutomaticRenewal();\n }\n async signinRedirect(_args = {}) {\n unsupported('Redirect navigation');\n }\n async signinRedirectCallback(_url) {\n unsupported('Redirect navigation');\n }\n async signinCallback(_url) {\n unsupported('Browser callback dispatch');\n }\n async signinSilentCallback(_url) {\n unsupported('Iframe navigation');\n }\n async signoutRedirect(_args = {}) {\n unsupported('Redirect navigation');\n }\n async signoutRedirectCallback(_url) {\n unsupported('Redirect navigation');\n }\n async signoutCallback(_url, _keepOpen) {\n unsupported('Browser callback dispatch');\n }\n async signoutSilent(_args = {}) {\n unsupported('Iframe logout');\n }\n async signoutSilentCallback(_url) {\n unsupported('Iframe logout');\n }\n async querySessionStatus(_args = {}) {\n unsupported('Browser session monitoring');\n }\n async storeUser(user) {\n await super.storeUser(user);\n await NativeOidc.setSessionSnapshot({\n namespace: this.storageNamespace,\n value: user\n ? JSON.stringify(toStoredSession(user, user.profile.iss ?? this.settings.metadata?.issuer ?? this.settings.authority, this.settings.client_id))\n : null,\n });\n }\n cancel() {\n return NativeOidc.cancel();\n }\n async disposePlatform() {\n await this.appStateListener?.remove();\n }\n async performSilentSignin(args) {\n const user = await this.getUser();\n if (!user?.refresh_token) {\n if (user?.expired)\n await this.removeUserWithoutWaiting();\n return null;\n }\n return super.performSilentSignin({ ...args, forceIframeAuth: false }).catch(async (error) => {\n if (error instanceof ErrorResponse && error.error === 'invalid_grant')\n await this.removeUserWithoutWaiting();\n throw error;\n });\n }\n}\nfunction toStoredSession(user, issuer, clientId) {\n return {\n version: 1,\n issuer,\n clientId,\n accessToken: user.access_token,\n refreshToken: user.refresh_token,\n idToken: user.id_token,\n tokenType: user.token_type,\n scope: user.scope,\n expiresAt: user.expires_at,\n };\n}\n//# sourceMappingURL=native-capacitor-user-manager.js.map","import { CapacitorUserManager } from './capacitor-user-manager.js';\nexport class WebCapacitorUserManager extends CapacitorUserManager {\n sessionMonitor;\n disposed = false;\n constructor(configuration) {\n super(configuration);\n this.sessionMonitor = this.captureSessionMonitor();\n }\n async querySessionStatus(args = {}) {\n if (this.disposed)\n return null;\n const session = await super.querySessionStatus(args);\n return this.disposed ? null : session;\n }\n disposePlatform() {\n this.disposed = true;\n if (this.sessionMonitor) {\n this.events.removeUserLoaded(this.sessionMonitor.start);\n this.events.removeUserUnloaded(this.sessionMonitor.stop);\n this.sessionMonitor.stop();\n }\n return Promise.resolve();\n }\n captureSessionMonitor() {\n // oidc-client-ts does not expose public session-monitor lifecycle hooks.\n const monitor = this._sessionMonitor;\n if (!monitor)\n return undefined;\n const originalStart = monitor._start;\n const stop = monitor._stop;\n const start = async (user) => {\n if (this.disposed)\n return;\n await originalStart(user);\n if (this.disposed)\n stop();\n };\n this.events.removeUserLoaded(originalStart);\n this.events.addUserLoaded(start);\n monitor._start = start;\n return { start, stop };\n }\n}\n//# sourceMappingURL=web-capacitor-user-manager.js.map","import { CapacitorUserManager, setPlatformUserManagerFactory } from './capacitor-user-manager.js';\nimport { NativeCapacitorUserManager } from './native-capacitor-user-manager.js';\nimport { WebCapacitorUserManager } from './web-capacitor-user-manager.js';\nsetPlatformUserManagerFactory((configuration) => configuration.platform === 'web'\n ? new WebCapacitorUserManager(configuration)\n : NativeCapacitorUserManager.fromConfiguration(configuration));\nexport { CapacitorUserManager };\nexport { CapacitorSecureStateStore } from './capacitor-secure-state-store.js';\nexport { CapacitorOidcError } from './errors.js';\nexport { User, WebStorageStateStore } from 'oidc-client-ts';\n//# sourceMappingURL=index.js.map"],"names":["UserManager","Capacitor","registerPlugin","App","ErrorResponse"],"mappings":";;;;;;AAAO,MAAM,kBAAkB,SAAS,KAAK,CAAC;AAC9C,IAAI,IAAI;AACR,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE;AAC/B,QAAQ,KAAK,CAAC,OAAO,CAAC;AACtB,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,IAAI,GAAG,oBAAoB;AACxC,IAAI;AACJ;AACO,SAAS,WAAW,CAAC,OAAO,EAAE;AACrC,IAAI,MAAM,IAAI,kBAAkB,CAAC,qBAAqB,EAAE,CAAC,EAAE,OAAO,CAAC,+CAA+C,CAAC,CAAC;AACpH;;ACRO,MAAM,wBAAwB,SAASA,wBAAW,CAAC;AAC1D,IAAI,uBAAuB;AAC3B,IAAI,cAAc;AAClB,IAAI,UAAU;AACd,IAAI,WAAW;AACf,IAAI,iBAAiB;AACrB,IAAI,kBAAkB;AACtB,IAAI,WAAW,CAAC,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE;AACnF,QAAQ,KAAK,CAAC,aAAa,CAAC,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,CAAC;AACzF,QAAQ,IAAI,CAAC,UAAU,GAAG,aAAa,CAAC,UAAU;AAClD,QAAQ,IAAI,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,aAAa,CAAC;AACnD,QAAQ,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;AACxC,QAAQ,OAAO,CAAC,MAAM,GAAG,KAAK;AAC9B,QAAQ,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE;AAC9B,IAAI;AACJ;;ACvCA,6BAA6B,CAAC,CAAC,aAAa,KAAK,aAAa,CAAC,QAAQ,KAAK;AAC5E,MAAM,IAAI,uBAAuB,CAAC,aAAa;AAC/C,MAAM,0BAA0B,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs","sources":["esm/errors.js","esm/base-capacitor-user-manager.js","esm/user-manager-settings-policy.js","esm/configuration.js","esm/capacitor-user-manager.js","esm/native.js","esm/capacitor-navigator.js","esm/capacitor-secure-state-store.js","esm/native-capacitor-user-manager.js","esm/web-capacitor-user-manager.js","esm/index.js"],"sourcesContent":["export class CapacitorOidcError extends Error {\n code;\n constructor(code, message) {\n super(message);\n this.code = code;\n this.name = 'CapacitorOidcError';\n }\n}\nexport function unsupported(feature) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', `${feature} is not available in a native Capacitor runtime`);\n}\n//# sourceMappingURL=errors.js.map","import { UserManager, } from 'oidc-client-ts';\nimport { unsupported } from './errors.js';\nexport class BaseCapacitorUserManager extends UserManager {\n automaticRenewalPromise;\n refreshPromise;\n signinMode;\n signoutMode;\n defaultSigninArgs;\n defaultSignoutArgs;\n constructor(configuration, redirectNavigator, popupNavigator, iframeNavigator) {\n super(configuration.settings, redirectNavigator, popupNavigator, iframeNavigator);\n this.signinMode = configuration.signinMode;\n this.signoutMode = configuration.signoutMode;\n this.defaultSigninArgs = configuration.signinArgs;\n this.defaultSignoutArgs = configuration.signoutArgs;\n }\n async initialize() {\n await this.getUser();\n }\n async signin(args = {}) {\n const mergedArgs = { ...this.defaultSigninArgs, ...args };\n if (this.signinMode === 'redirect')\n return this.signinRedirect(mergedArgs);\n await this.signinPopup(mergedArgs);\n }\n async signout(args = {}) {\n const mergedArgs = { ...this.defaultSignoutArgs, ...args };\n if (this.signoutMode === 'redirect')\n return this.signoutRedirect(mergedArgs);\n await this.signoutPopup(mergedArgs);\n }\n async getValidUser(minimumValiditySeconds = 60) {\n const user = await this.getUser();\n if (!user)\n return null;\n if (user.expires_in === undefined || user.expires_in > minimumValiditySeconds)\n return user;\n return this.signinSilent();\n }\n async signinPopup(args = {}) {\n await this.waitForRenewal();\n return super.signinPopup(args);\n }\n async signoutPopup(args = {}) {\n await this.waitForRenewal();\n await super.signoutPopup(args);\n }\n async signinRedirect(args = {}) {\n await this.waitForRenewal();\n await super.signinRedirect(args);\n }\n async signoutRedirect(args = {}) {\n await this.waitForRenewal();\n await super.signoutRedirect(args);\n }\n signinSilent(args = {}) {\n if (!this.refreshPromise) {\n const refresh = this.performSilentSignin(args);\n this.refreshPromise = refresh.finally(() => {\n this.refreshPromise = undefined;\n });\n }\n return this.refreshPromise;\n }\n async signinResourceOwnerCredentials(_args) {\n unsupported('Resource Owner Password Credentials');\n }\n async removeUser() {\n await this.waitForRenewal();\n await this.removeUserWithoutWaiting();\n }\n cancel() {\n return Promise.resolve();\n }\n async dispose() {\n this.stopSilentRenew();\n await this.disposePlatform();\n await this.waitForRenewal();\n await this.cancel();\n }\n performSilentSignin(args) {\n return super.signinSilent(args);\n }\n removeUserWithoutWaiting() {\n return super.removeUser();\n }\n checkForAutomaticRenewal() {\n if (!this.settings.automaticSilentRenew || this.automaticRenewalPromise)\n return;\n const renewal = this.getValidUser();\n this.automaticRenewalPromise = renewal;\n void renewal\n .catch((error) => this.events._raiseSilentRenewError(error instanceof Error ? error : new Error('Silent renewal failed')))\n .finally(() => {\n if (this.automaticRenewalPromise === renewal)\n this.automaticRenewalPromise = undefined;\n });\n }\n async waitForRenewal() {\n await this.automaticRenewalPromise?.catch(() => undefined);\n await this.refreshPromise?.catch(() => undefined);\n }\n}\n//# sourceMappingURL=base-capacitor-user-manager.js.map","export const WEB_ONLY_SETTINGS = [\n 'checkSessionIntervalInSeconds',\n 'dpop',\n 'iframeNotifyParentOrigin',\n 'iframeScriptOrigin',\n 'includeIdTokenInSilentSignout',\n 'monitorAnonymousSession',\n 'monitorSession',\n 'popup_post_logout_redirect_uri',\n 'popup_redirect_uri',\n 'popupWindowFeatures',\n 'popupWindowTarget',\n 'query_status_response_type',\n 'redirectMethod',\n 'redirectTarget',\n 'silent_redirect_uri',\n 'silentRequestTimeoutInSeconds',\n 'stateStore',\n 'stopCheckSessionOnError',\n 'userStore',\n];\n//# sourceMappingURL=user-manager-settings-policy.js.map","import { CapacitorOidcError } from './errors.js';\nimport { WEB_ONLY_SETTINGS } from './user-manager-settings-policy.js';\nexport function resolveConfiguration(configuration, platform) {\n if (platform === 'web')\n return resolveWebConfiguration(configuration);\n return resolveNativeConfiguration(configuration, platform);\n}\nexport function resolveLegacyNativeConfiguration(settings, nativeOptions, platform) {\n if (platform === 'web') {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', 'Legacy CapacitorUserManager settings are only supported on iOS and Android');\n }\n assertPublicClient(settings);\n if ('dpop' in settings) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', 'Native configuration does not support dpop');\n }\n return resolvedNativeConfiguration(platform, settings, nativeOptions);\n}\nfunction resolveWebConfiguration(configuration) {\n const web = configuration.web;\n if (!web)\n unsupportedConfiguration('web');\n const signoutMode = web.signoutMode ?? 'redirect';\n const settings = { ...configuration.common, ...web.settings };\n assertPublicClient(settings);\n if (signoutMode === 'popup' && !settings.popup_post_logout_redirect_uri && !settings.post_logout_redirect_uri) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', 'Web popup signout requires post_logout_redirect_uri or popup_post_logout_redirect_uri');\n }\n return {\n platform: 'web',\n settings,\n signinMode: web.signinMode ?? 'redirect',\n signoutMode,\n signinArgs: web.signinArgs ?? {},\n signoutArgs: web.signoutArgs ?? {},\n };\n}\nfunction resolveNativeConfiguration(configuration, platform) {\n const native = configuration.native;\n if (!native)\n unsupportedConfiguration(platform);\n const override = configuration[platform];\n const settings = { ...configuration.common, ...native.settings, ...override?.settings };\n assertPublicClient(settings);\n assertNativeSettings(settings);\n return resolvedNativeConfiguration(platform, settings, { ...native.options, ...override?.options }, { ...native.signinArgs, ...override?.signinArgs }, { ...native.signoutArgs, ...override?.signoutArgs });\n}\nfunction resolvedNativeConfiguration(platform, settings, nativeOptions, signinArgs = {}, signoutArgs = {}) {\n return {\n platform,\n settings: { ...settings, response_type: 'code', disablePKCE: false, monitorSession: false },\n nativeOptions,\n signinMode: 'popup',\n signoutMode: 'popup',\n signinArgs,\n signoutArgs,\n };\n}\nfunction assertPublicClient(settings) {\n const unsupported = ['client_authentication', 'client_secret', 'disablePKCE', 'response_type'].find((key) => key in settings);\n if (unsupported) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', `Public-client configuration does not support ${unsupported}`);\n }\n}\nfunction assertNativeSettings(settings) {\n const unsupported = WEB_ONLY_SETTINGS.find((key) => key in settings);\n if (unsupported) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', `Native configuration does not support ${unsupported}`);\n }\n}\nfunction unsupportedConfiguration(platform) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', `No ${platform} configuration was provided`);\n}\n//# sourceMappingURL=configuration.js.map","import { Capacitor } from '@capacitor/core';\nimport { BaseCapacitorUserManager } from './base-capacitor-user-manager.js';\nimport { resolveConfiguration, resolveLegacyNativeConfiguration, } from './configuration.js';\nimport { CapacitorOidcError } from './errors.js';\nexport class CapacitorUserManager extends BaseCapacitorUserManager {\n static async create(configuration, nativeOptions = {}) {\n assertRuntime();\n const platform = currentPlatform();\n const resolved = 'redirect_uri' in configuration\n ? resolveLegacyNativeConfiguration(configuration, nativeOptions, platform)\n : resolveConfiguration(configuration, platform);\n const manager = await platformUserManagerFactory(resolved);\n await manager.initialize();\n return manager;\n }\n}\nlet platformUserManagerFactory;\nexport function setPlatformUserManagerFactory(factory) {\n platformUserManagerFactory = factory;\n}\nfunction currentPlatform() {\n const platform = Capacitor.getPlatform();\n return platform === 'ios' || platform === 'android' ? platform : 'web';\n}\nfunction assertRuntime() {\n if (!globalThis.crypto?.subtle || !globalThis.crypto.getRandomValues) {\n throw new CapacitorOidcError('UNSUPPORTED_RUNTIME', 'Web Crypto is required by oidc-client-ts');\n }\n}\n//# sourceMappingURL=capacitor-user-manager.js.map","import { registerPlugin } from '@capacitor/core';\nexport const NativeOidc = registerPlugin('CapacitorOidc');\n//# sourceMappingURL=native.js.map","import { CapacitorOidcError, unsupported } from './errors.js';\nimport { NativeOidc } from './native.js';\nexport class CapacitorNavigator {\n prefersEphemeralWebBrowserSession;\n constructor(prefersEphemeralWebBrowserSession) {\n this.prefersEphemeralWebBrowserSession = prefersEphemeralWebBrowserSession;\n }\n async prepare() {\n return new CapacitorWindow(this.prefersEphemeralWebBrowserSession);\n }\n async callback() {\n unsupported('Navigator callbacks');\n }\n}\nclass CapacitorWindow {\n prefersEphemeralWebBrowserSession;\n constructor(prefersEphemeralWebBrowserSession) {\n this.prefersEphemeralWebBrowserSession = prefersEphemeralWebBrowserSession;\n }\n async navigate({ url }) {\n assertSecureRequestUrl(url);\n const callbackUrl = callbackUrlFromRequest(url);\n const response = await NativeOidc.open({\n url,\n callbackUrl,\n prefersEphemeralWebBrowserSession: this.prefersEphemeralWebBrowserSession,\n });\n if (!isExpectedCallback(response.url, callbackUrl)) {\n throw new CapacitorOidcError('INVALID_CALLBACK', 'The authentication callback does not match the configured redirect URI');\n }\n return response;\n }\n close() {\n void NativeOidc.cancel();\n }\n}\nexport function assertSecureRequestUrl(requestUrl) {\n const url = new URL(requestUrl);\n const isHttpLoopback = url.protocol === 'http:' &&\n (url.hostname === 'localhost' || url.hostname === '127.0.0.1' || url.hostname === '[::1]');\n if (url.protocol !== 'https:' && !isHttpLoopback) {\n throw new CapacitorOidcError('BROWSER_UNAVAILABLE', 'OIDC authorization and logout endpoints must use HTTPS');\n }\n}\nexport function callbackUrlFromRequest(requestUrl) {\n const url = new URL(requestUrl);\n const callback = url.searchParams.get('post_logout_redirect_uri') ??\n url.searchParams.get('logout_uri') ??\n url.searchParams.get('redirect_uri');\n if (!callback) {\n throw new CapacitorOidcError('INVALID_CALLBACK', 'The OIDC request does not contain a callback URI');\n }\n return callback;\n}\nexport function isExpectedCallback(actualValue, expectedValue) {\n const actual = new URL(actualValue);\n const expected = new URL(expectedValue);\n return (actual.protocol.toLowerCase() === expected.protocol.toLowerCase() &&\n actual.host.toLowerCase() === expected.host.toLowerCase() &&\n actual.pathname === expected.pathname);\n}\nexport class UnsupportedIframeNavigator {\n async prepare() {\n unsupported('Iframe navigation');\n }\n async callback() {\n unsupported('Iframe navigation');\n }\n}\n//# sourceMappingURL=capacitor-navigator.js.map","import { NativeOidc } from './native.js';\nexport class CapacitorSecureStateStore {\n namespace;\n constructor(namespace) {\n this.namespace = namespace;\n }\n async set(key, value) {\n await NativeOidc.storageSet({ namespace: this.namespace, key, value });\n }\n async get(key) {\n return (await NativeOidc.storageGet({ namespace: this.namespace, key })).value;\n }\n async remove(key) {\n return (await NativeOidc.storageRemove({ namespace: this.namespace, key })).value;\n }\n async getAllKeys() {\n return (await NativeOidc.storageGetAllKeys({ namespace: this.namespace })).keys;\n }\n}\n//# sourceMappingURL=capacitor-secure-state-store.js.map","import { App } from '@capacitor/app';\nimport { ErrorResponse, } from 'oidc-client-ts';\nimport { CapacitorNavigator, UnsupportedIframeNavigator } from './capacitor-navigator.js';\nimport { CapacitorSecureStateStore } from './capacitor-secure-state-store.js';\nimport { CapacitorUserManager } from './capacitor-user-manager.js';\nimport { unsupported } from './errors.js';\nimport { NativeOidc } from './native.js';\nexport class NativeCapacitorUserManager extends CapacitorUserManager {\n appStateListener;\n storageNamespace;\n constructor(configuration) {\n const storageNamespace = configuration.nativeOptions?.storageNamespace ?? 'default';\n const stateStore = new CapacitorSecureStateStore(`${storageNamespace}.transactions`);\n const userStore = new CapacitorSecureStateStore(`${storageNamespace}.session`);\n const navigator = new CapacitorNavigator(configuration.nativeOptions?.prefersEphemeralWebBrowserSession ?? false);\n super({\n ...configuration,\n settings: {\n ...configuration.settings,\n popup_redirect_uri: configuration.settings.redirect_uri,\n popup_post_logout_redirect_uri: configuration.settings.post_logout_redirect_uri,\n stateStore,\n userStore,\n },\n }, navigator, navigator, new UnsupportedIframeNavigator());\n this.storageNamespace = storageNamespace;\n }\n static async fromConfiguration(configuration) {\n await NativeOidc.configure(configuration.nativeOptions?.ios ?? {});\n return new NativeCapacitorUserManager(configuration);\n }\n async initialize() {\n await super.initialize();\n this.appStateListener = await App.addListener('appStateChange', ({ isActive }) => {\n if (isActive)\n this.checkForAutomaticRenewal();\n });\n this.checkForAutomaticRenewal();\n }\n async signinRedirect(_args = {}) {\n unsupported('Redirect navigation');\n }\n async signinRedirectCallback(_url) {\n unsupported('Redirect navigation');\n }\n async signinCallback(_url) {\n unsupported('Browser callback dispatch');\n }\n async signinSilentCallback(_url) {\n unsupported('Iframe navigation');\n }\n async signoutRedirect(_args = {}) {\n unsupported('Redirect navigation');\n }\n async signoutRedirectCallback(_url) {\n unsupported('Redirect navigation');\n }\n async signoutCallback(_url, _keepOpen) {\n unsupported('Browser callback dispatch');\n }\n async signoutSilent(_args = {}) {\n unsupported('Iframe logout');\n }\n async signoutSilentCallback(_url) {\n unsupported('Iframe logout');\n }\n async querySessionStatus(_args = {}) {\n unsupported('Browser session monitoring');\n }\n async storeUser(user) {\n await super.storeUser(user);\n await NativeOidc.setSessionSnapshot({\n namespace: this.storageNamespace,\n value: user\n ? JSON.stringify(toStoredSession(user, user.profile.iss ?? this.settings.metadata?.issuer ?? this.settings.authority, this.settings.client_id))\n : null,\n });\n }\n cancel() {\n return NativeOidc.cancel();\n }\n async disposePlatform() {\n await this.appStateListener?.remove();\n }\n async performSilentSignin(args) {\n const user = await this.getUser();\n if (!user?.refresh_token) {\n if (user?.expired)\n await this.removeUserWithoutWaiting();\n return null;\n }\n return super.performSilentSignin({ ...args, forceIframeAuth: false }).catch(async (error) => {\n if (error instanceof ErrorResponse && error.error === 'invalid_grant')\n await this.removeUserWithoutWaiting();\n throw error;\n });\n }\n}\nfunction toStoredSession(user, issuer, clientId) {\n return {\n version: 1,\n issuer,\n clientId,\n accessToken: user.access_token,\n refreshToken: user.refresh_token,\n idToken: user.id_token,\n tokenType: user.token_type,\n scope: user.scope,\n expiresAt: user.expires_at,\n };\n}\n//# sourceMappingURL=native-capacitor-user-manager.js.map","import { CapacitorUserManager } from './capacitor-user-manager.js';\nexport class WebCapacitorUserManager extends CapacitorUserManager {\n sessionMonitor;\n disposed = false;\n constructor(configuration) {\n super(configuration);\n this.sessionMonitor = this.captureSessionMonitor();\n }\n async querySessionStatus(args = {}) {\n if (this.disposed)\n return null;\n const session = await super.querySessionStatus(args);\n return this.disposed ? null : session;\n }\n disposePlatform() {\n this.disposed = true;\n if (this.sessionMonitor) {\n this.events.removeUserLoaded(this.sessionMonitor.start);\n this.events.removeUserUnloaded(this.sessionMonitor.stop);\n this.sessionMonitor.stop();\n }\n return Promise.resolve();\n }\n captureSessionMonitor() {\n // oidc-client-ts does not expose public session-monitor lifecycle hooks.\n const monitor = this._sessionMonitor;\n if (!monitor)\n return undefined;\n const originalStart = monitor._start;\n const stop = monitor._stop;\n const start = async (user) => {\n if (this.disposed)\n return;\n await originalStart(user);\n if (this.disposed)\n stop();\n };\n this.events.removeUserLoaded(originalStart);\n this.events.addUserLoaded(start);\n monitor._start = start;\n return { start, stop };\n }\n}\n//# sourceMappingURL=web-capacitor-user-manager.js.map","import { CapacitorUserManager, setPlatformUserManagerFactory } from './capacitor-user-manager.js';\nimport { NativeCapacitorUserManager } from './native-capacitor-user-manager.js';\nimport { WebCapacitorUserManager } from './web-capacitor-user-manager.js';\nsetPlatformUserManagerFactory((configuration) => configuration.platform === 'web'\n ? new WebCapacitorUserManager(configuration)\n : NativeCapacitorUserManager.fromConfiguration(configuration));\nexport { CapacitorUserManager };\nexport { CapacitorSecureStateStore } from './capacitor-secure-state-store.js';\nexport { CapacitorOidcError } from './errors.js';\nexport { User, WebStorageStateStore } from 'oidc-client-ts';\n//# sourceMappingURL=index.js.map"],"names":["UserManager","Capacitor","registerPlugin","App","ErrorResponse"],"mappings":";;;;;;AAAO,MAAM,kBAAkB,SAAS,KAAK,CAAC;AAC9C,IAAI,IAAI;AACR,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE;AAC/B,QAAQ,KAAK,CAAC,OAAO,CAAC;AACtB,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,IAAI,GAAG,oBAAoB;AACxC,IAAI;AACJ;AACO,SAAS,WAAW,CAAC,OAAO,EAAE;AACrC,IAAI,MAAM,IAAI,kBAAkB,CAAC,qBAAqB,EAAE,CAAC,EAAE,OAAO,CAAC,+CAA+C,CAAC,CAAC;AACpH;;ACRO,MAAM,wBAAwB,SAASA,wBAAW,CAAC;AAC1D,IAAI,uBAAuB;AAC3B,IAAI,cAAc;AAClB,IAAI,UAAU;AACd,IAAI,WAAW;AACf,IAAI,iBAAiB;AACrB,IAAI,kBAAkB;AACtB,IAAI,WAAW,CAAC,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE;AACnF,QAAQ,KAAK,CAAC,aAAa,CAAC,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,CAAC;AACzF,QAAQ,IAAI,CAAC,UAAU,GAAG,aAAa,CAAC,UAAU;AAClD,QAAQ,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC,WAAW;AACpD,QAAQ,IAAI,CAAC,iBAAiB,GAAG,aAAa,CAAC,UAAU;AACzD,QAAQ,IAAI,CAAC,kBAAkB,GAAG,aAAa,CAAC,WAAW;AAC3D,IAAI;AACJ,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,MAAM,IAAI,CAAC,OAAO,EAAE;AAC5B,IAAI;AACJ,IAAI,MAAM,MAAM,CAAC,IA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I,EAAE;AACtB,QAAQ,CAAC;AACT,QAAQ,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,aAAa,CAAC;AACnD,QAAQ,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;AACxC,QAAQ,OAAO,CAAC,MAAM,GAAG,KAAK;AAC9B,QAAQ,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE;AAC9B,IAAI;AACJ;;ACvCA,6BAA6B,CAAC,CAAC,aAAa,KAAK,aAAa,CAAC,QAAQ,KAAK;AAC5E,MAAM,IAAI,uBAAuB,CAAC,aAAa;AAC/C,MAAM,0BAA0B,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-oidc",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "OAuth 2.0 and OpenID Connect authentication for Capacitor web, iOS, and Android, powered by oidc-client-ts.",
5
5
  "keywords": [
6
6
  "capacitor",
@@ -43,7 +43,7 @@
43
43
  "bugs": {
44
44
  "url": "https://github.com/jojopirker/capacitor-oidc/issues"
45
45
  },
46
- "homepage": "https://github.com/jojopirker/capacitor-oidc#readme",
46
+ "homepage": "https://jojopirker.github.io/capacitor-oidc/",
47
47
  "type": "module",
48
48
  "scripts": {
49
49
  "build": "npm run clean && tsc && rollup -c rollup.config.mjs",