Closer
Search…
User authorization callbacks
You can provide a function to be called after user succesful user authorization in widget.
1
closer.init({
2
orgId: "00000000-0000-0000-0000-000000000000",
3
onUserAuthorizationSuccess: () => console.log("USER AUTHORIZED")
4
});
Copied!
If you use OAuth for customers authorization that provides ID Token you can get it in this callback.
1
closer.init({
2
orgId: "00000000-0000-0000-0000-000000000000",
3
onUserAuthorizationSuccess: (authorizationResult: {idToken?: string}) => console.log(idToken)
4
});
Copied!
Sometimes your user might not authorize, especially when using OAuth. There is other callback for that situation.
1
closer.init({
2
orgId: "00000000-0000-0000-0000-000000000000",
3
onUserAuthorizationFailed: () => console.log("USER FAILED TO AUTHORIZED")
4
});
Copied!
Last modified 6mo ago
Copy link