Usage
Initialize Flutter SDK
After installation, the next step to use the AirKit SDK is to initialize AirService
by calling the initialize
method.
The partnerId
you will receive from us and the redirectUrl
parameter needs to match the schema discussed in the installation section. It is different for Android and iOS.
Rehydration
In case a user should be rehydrated after e.g. an app restart, rehydrate
can be called to automatically login a previously logged in user with an existing valid session. Otherwise login needs to be called.
Login
Before the login
method can be used, custom auth details need to be setup first on our end. Currently, the email address needs to be used as identifier inside the JWT which will be generated on your side.
An example JWT could look like following:
In order to validate the JWTs on our end, we need to know your JWKS endpoint with following JSON:
The above JWKS should contain the public key only, but the JWT generated on your end needs to be signed with the private key.