generateSessionToken( )


Creates a session token for a member authenticated by a 3rd party.

The generateSessionToken() function returns a Promise that resolves to a session token used to log a member in to your site.

Use generateSessionToken() to bypass Wix member authentication when using a 3rd-party service to authenticate your members. For example, you can use generateSessionToken() to provide Single Sign-On (SSO) for members where they authenticate with a non-Wix entity to log in to your Wix site.

If the specified email address corresponds to an existing member, a session token for logging in that member is generated.

If there is no existing member with the specified email address, a new member is created and a session token for logging in that member is generated. The member is created with a random password.

Method Declaration
Copy
Method Parameters
emailstringRequired

Login email address of the member to approve.

Returns
Return Type:Promise<string>
Was this helpful?
Yes
No