PortalAuth

constructor(authEnvironmentId: String, redirectUrl: String, apiHost: String = PortalAuthApi.DEFAULT_API_HOST, magicLink: MagicLinkConfig? = null, isAccountAbstracted: Boolean? = null)

Parameters

authEnvironmentId

The auth environment these logins belong to. Also the session's storage key, so two instances sharing one share the persisted session.

redirectUrl

Where the Portal backend sends the user once the magic link (or a provider) is done. Must be allow-listed for the auth environment, and must match the intent-filter the host app registers.

apiHost

Optional API host override.

magicLink

Required only by sendMagicLink; OAuth-only apps never need it.

isAccountAbstracted

When set, requests an account-abstracted client.

Throws

when authEnvironmentId or redirectUrl is blank.