Outseta's embed API allows you to programmatically control the sign-up, login, and profile embeds.
Explore the events available in the Outseta Lifecycle Code Sandbox.
General
API
Method | Description |
---|---|
Outseta.getAccessToken() |
Returns the currently stored access token. |
Outseta.getJwtPayload() |
Returns the currently stored JWT payload. Aka. the decoded access token. |
Outseta.getJwtPayload(accessToken) |
Returns the decoded JWT payload from the access token. |
Outseta.getUser() |
Returns the currently logged-in user. This method returns a JavaScript Promise that will be resolved when the user is logged in and their information has been retrieved from the server. The returned user object also has an update(data) method, which can be used to update user properties. |
Outseta.on(event, callback) |
Registers a callback for an event. If a callback returns false , it will stop other registered callbacks from being called. The most recently registered callback will be executed first. |
Outseta.setAccessToken(accessToken) |
Sets the access token. |
Events
Event | Data | Description |
---|---|---|
accessToken.set |
Decoded JWT | Triggered when the access token (encoded JWT) is set and decodes it for you. |
Sign-up and Login
API
Method | Description |
---|---|
Outseta.auth.open(options) |
Opens the Sign-up or Login widget configured with the passed-in options object. |
Outseta.auth.close() |
Closes the Sign-up or Login widget when in popup mode. |
Events
Event | Data | Description |
---|---|---|
auth.initialized |
Triggered when the Sign-up or Login widget has loaded. | |
auth.close |
Triggered when the Sign-up or Login widget has been closed (only applicable when the widget is operating in popup mode). | |
redirect |
url | Triggered when a redirect is about to occur. |
signup.registrationData |
Account object | Triggered after the user fills out fields on the Register step |
signup.preRegister |
Account object | Triggered immediately before registration data will be sent to the server. |
signup |
Account object | Triggered after a registration has completed. |
NoCode
Events
Event | Data | Description |
---|---|---|
logout |
Triggered when the user has clicked the logout link. |
|
nocode.accessDenied |
Triggered when the NoCode logic has determined that a user does not have access to a page. |
|
nocode.expired |
Triggered when the user's access token has expired. |
|
nocode.initialized |
Triggered when the NoCode logic has finished running for a page. |
Profile
API
Method | Description |
---|---|
Outseta.profile.open(options) |
Opens the Profile widget configured with the passed-in options object. |
Outseta.profile.close() |
Closes the Profile widget when in popup mode. |
Events
Event | Data | Description |
---|---|---|
account.update |
Account object | Triggered when the user clicks Save on the Account tab. |
paymentInformation.update |
Payment information object | Triggered when the user adds or removes Payment Information. Will be null when removing. |
profile.close |
Triggered when the Profile widget has been closed (only applicable when the widget is operating in popup mode). | |
profile.initialized |
Triggered when the Profile widget has loaded. | |
profile.update |
Person object | Triggered when the user clicks Save on the Profile tab. |
subscription.cancel |
Subscription Cancellation object | Triggered when the user cancels their subscription. |
subscription.reopen |
Subscription object | Triggered when the user re-opens their subscription. |
subscription.update |
Subscription object | Triggered when the user changes their subscription. |