configure

fun configure(onConfigureListener: OnConfigureListener, handler: Handler = Handler(Looper.getMainLooper()), resource: String? = null, scopes: List<String>? = null)

Configure authgear. This must be ran before any other methods. If configuration is successful and there was a valid user session, authgear's accessToken is non-null and the token is ready to be used.

It does local IO to retrieve the refresh token.

Therefore, it is possible that configure() could fail for some reasons.

configure() can be called more than once if it failed. Otherwise, it is NOT recommended to call it more than once.

Parameters

onConfigureListener

The listener.

handler

The handler of the thread on which the listener is called.

resource

Default resource indicator (RFC 8707) for every method that takes a resource. It is used only when the call does not specify its own, which replaces it.

scopes

Default scopes of the API Resource given in resource, for the methods that create a new grant. They are used only when the call does not specify its own, which replaces them. The scopes required by the SDK are always merged in.