what do i do after successful response

Created on 9 February 2022, almost 3 years ago
Updated 17 September 2024, about 2 months ago

I've passed an access_token to the endpoint, which successfully returns

{
    "current_user": {
        "uid": "104",
        "roles": [
            "authenticated",
            "development"
        ],
        "name": "NotARealUser"
    },
    "csrf_token": "1234567890987654321NotARealToken",
    "logout_token": "1234567890987654321NotARealToken"
}

My question is what do I do with this in order to make authenticated requests (everything on my site requires login for access). We use the X-CSRF-Token header to make POST/UPDATE requests for our web apps, but that is cookie based auth.

How is this intended to work from something like an iOS app built in react-native? Is it still cookie based? I see that in the successful response there is a `Set-Cookie` header, which does set a cookie in Postman. Was hoping to avoid cookie based auth for our app, if possible.

Just hoping someone can confirm they are using this module along with cookies in an iOS or Android app. Or if not, another tool I can couple with this module to avoid using cookies.

I can't find much useful in google search, thanks in advance for any guidance!

πŸ’¬ Support request
Status

Active

Version

2.3

Component

Documentation

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024