mirror of
https://github.com/noodlapp/noodl-docs.git
synced 2026-01-12 23:32:54 +01:00
Initial commit
Co-Authored-By: kotte <14197736+mrtamagotchi@users.noreply.github.com> Co-Authored-By: mikaeltellhed <2311083+mikaeltellhed@users.noreply.github.com> Co-Authored-By: Tore Knudsen <18231882+torekndsn@users.noreply.github.com> Co-Authored-By: Michael Cartner <32543275+michaelcartner@users.noreply.github.com>
This commit is contained in:
38
library/prefabs/xano/components/xano-current-user/README.md
Normal file
38
library/prefabs/xano/components/xano-current-user/README.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
title: Current User
|
||||
hide_title: true
|
||||
---
|
||||
|
||||
# Current User
|
||||
|
||||
This component is used to fetch information from the current logged in users `/auth/me` path in Xano.
|
||||
|
||||
<div className="ndl-image-with-background xl">
|
||||
|
||||

|
||||
|
||||
</div>
|
||||
|
||||
On a request it checks if the user is still logged in by looking for a valid **authToken**. The **authToken** is automatically generated when the user is logged in.
|
||||
|
||||
> Please note that [Xano Client](/library/prefabs/xano/components/setup-xanoclient/) needs to be set up in your app before you can properly use this component.
|
||||
|
||||
## Inputs
|
||||
|
||||
| Signals | Description |
|
||||
| ----------------------------------------- | ------------------------------------------------- |
|
||||
| <span className="ndl-signal">Fetch</span> | Send a Signal to this input to retrieve the data. |
|
||||
|
||||
## Outputs
|
||||
|
||||
| Data | Description |
|
||||
| ------------------------------------------- | -------------------------------------------------------------------------- |
|
||||
| <span className="ndl-data">Logged In</span> | `true` if the user is logged in, `false` if not. |
|
||||
| <span className="ndl-data">Xano ID</span> | The users ID. |
|
||||
| <span className="ndl-data">Email</span> | The users email. |
|
||||
| <span className="ndl-data">User Data</span> | All the data retrieved from the `/auth/me` endpoint of the logged in user. |
|
||||
|
||||
| Signals | Description |
|
||||
| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
||||
| <span className="ndl-signal">Success</span> | Sends a signal when the request succeeded. |
|
||||
| <span className="ndl-signal">Failure</span> | Sends a signal when an error occurred, or if the **authToken** is expired, and logs an error message in the console. |
|
||||
Reference in New Issue
Block a user