$accessToken
Updated on Aug 19, 2025 2 minutes to readThe AccessToken Plugin provides methods to generate tokens for logging in without a username or password, and to retrieve login URLs for users.
Methods
Method | Description |
---|---|
getLoginUrl | Returns a login URL for a given user. |
getToken | Generates an access token for a given user. |
Methods Details
getLoginUrl()
• Type
(userId: number) => string
• Details
Expects a userId as a number identifying the target user.
Returns a string containing the login URL for the user.
• Example
const url = E8App.$accessToken.getLoginUrl(E8App.$currentUser.getId());
// url now contains the login URL for the current user
getToken()
• Type
(userId: number) => string
• Details
Expects a userId as a number identifying the target user.
Returns a string containing the access token for logging.
• Example
const token = E8App.$accessToken.getToken(E8App.$currentUser.getId());
// token now contains the access token for the current user