Logs the current member into the site using the given session token.
The applySessionToken()
function returns a Promise that resolves when the
given session token is applied and the current member is logged into the site.
You receive a session token from the following wix-members-backend functions:
Pass the returned session token to your page code and apply it by
calling applySessionToken()
to complete the process started by one of the
above functions.
function applySessionToken(sessionToken: string): Promise<void>;
Session token to apply.
import { authentication } from "wix-members-frontend";
// ...
authentication.applySessionToken(sessionToken).then(() => {
console.log("Member logged in.");
});
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.