Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic authentication with no access token in response for local provider #709

Open
1 of 5 tasks
idesignzone opened this issue Mar 9, 2024 · 1 comment
Open
1 of 5 tasks
Labels

Comments

@idesignzone
Copy link

Describe the feature

The backend I am working with Traccar does not return an access token in the response and token is generated via another request.

How to override token: { signInResponseTokenPointer: '/token/accessToken' }, in this senario for local provider?

How would you implement this?

No response

Additional information

  • Would you be willing to help implement this feature?

Provider

  • AuthJS
  • Local
  • Refresh
  • New Provider
@idesignzone idesignzone added enhancement An improvement that needs to be added pending labels Mar 9, 2024
@zoey-kaiser
Copy link
Member

zoey-kaiser commented Mar 30, 2024

Hi @idesignzone 👋

If the token is returned in a different format then the current default you can use a json pointer to find it!

// nuxt.config.ts
{
  auth: {
    token: {
      signInResponseTokenPointer: '/get/pointer/here'
    }
  }
}

Read more: https://sidebase.io/nuxt-auth/configuration/nuxt-config

If it is returned via a different url, you may have to look into making a custom api you can call to signin + return the accessToken. You could do this inside the ~/server/api directory.

@zoey-kaiser zoey-kaiser added question and removed enhancement An improvement that needs to be added pending labels Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants