Can i get the xano user auth token after it's created?

Options
If i create a user auth token in one call, can i retrieve it from the user table in another call later?

Is there a specific function to retrieve it? or can i only get it/use it right after creating it?

Comments

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    Typically, it's up to the front-end to remember the token, usually it will use something such as local or session storage to retain the token. 

    Additionally, it's best practice to have the token generated at the time of authentication. There is a Create Authentication Token function available, if you really wanted to use it somewhere else but I'd be extra careful implementing this. 

    To retrieve it from the user table it'd need to be stored in the user table.
  • Jay
    Jay Member
    Options
     I have a problem because draftbit is being annoying. The call that creates everything i need, including the user record and auth token, happens during an oauth redirect within a webview, and i cannot access an http header response within a webview, even with custom code. 

    Now if i want to create the auth token in a later call after creating the user record, how do i identify the correct user, if i can't retrieve any data from the first call. 

    Part of the problem is that this is a reddit client so they are not creating a username/password account with my app, they just authenticate by logging into reddit itself and getting an access token back.