Callback
With this approach, the callbacks for onSuccess and onError can be handled in the initialization process of the SDK. This is a valid approach if you are using the default SDK UI component.callbacks Example
Promise
You may have designed your own login UI and need to hook up the login / sign in button event. This will not be possible with the callbacks approach so we have provided apromise
approach.
Promise Example
sdk
and then use the sdk
to login when you press the button and use await
to wait for the authentication login response.