Validate current session (AppGyver Auth)
- 18 May 2022
- 1 Minute to read
-
DarkLight
-
PDF
Validate current session (AppGyver Auth)
- Updated on 18 May 2022
- 1 Minute to read
-
DarkLight
-
PDF
Validate the current user session when using an AppGyver Hosted Auth or AppGyver Cloud Auth backend.
The validation is done locally, i.e. the function only checks if a proper session exists, not if it is still valid in the backend.
If the validation is successful, the first output is triggered.
If the validation fails, the second output is triggered.
To use this flow, your app must have its authentication type set as AppGyver Hosted Auth or AppGyver Cloud Auth.
Input arguments
No input arguments.
Output arguments
Number of outputs: 2
Label | Key | Type | Description |
---|---|---|---|
Current user | currentUser
|
Object | Object containing the current user information after the session was validated. |
|
currentUser.id
|
Number | Unique user ID for the logged-in user. |
|
currentUser.username
|
String | Username for the logged-in user, typically an email address |
|
currentUser.metadata
|
Object | User metadata. Since no schema is enforced by the backend, it is given here as a schemaless object. |
|
currentUser.groups
|
Array | Groups the user belongs to. |
|
currentUser.accessToken
|
String | Access token used to access AppGyver-hosted cloud resources, such as databases or integrations. |
Session valid | sessionValid
|
Boolean | True/false value describing if the session is valid or not. |
Events
No events.
Errors
No errors.
Was this article helpful?