Skip to content
This repository was archived by the owner on Aug 5, 2024. It is now read-only.
This repository was archived by the owner on Aug 5, 2024. It is now read-only.

Dynamic token and user payload key #33

@YoungMayor

Description

@YoungMayor

Most APIs I have worked with and on use a data structure like the one below.

{
  status: 'success', 
  message: 'Login successful', 
  data: {
    token: '1|jyRcruq3NHCXj0NvgrlRAVZEO1TR9AUHqOFZ8O1j'
  }
}

This is not a global standard nor is it being used by everyone though.

But I was wondering if you could include a key on the configuration which points to the token. In the case of the above, it would be 'data.token'.

Similar would also be very useful on the get user details endpoint

Also when nuxtSanctumAuth.token is set to true, could you make the include credentials header configurable such that a user can set to include it or not.

Thanks a lot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions