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

To have a method or some helper to get the user access token from drupal #619

Open
joshirohit100 opened this issue Dec 5, 2023 · 0 comments
Labels
enhancement New feature or request triage A new issue that needs triage

Comments

@joshirohit100
Copy link
Contributor

Package

next-drupal (NPM package)

Describe the feature request

I was checking the login flow on nextjs site with next-auth where user needs to login to site using creds.
To this, I was checking to getting the access token from drupal.
Initially I just did (based on quick checks on helper methods name) -

const drupal = new DrupalClien(options here for password grant and auth);
const token = drupal.getAccessToken()

but seems like ^^ only work for the client_credentials grant.

So it would be helpful to have a method to get the token from drupal rather doing / writing all like https://github.com/chapter-three/next-drupal/blob/main/examples/example-auth/pages/api/auth/%5B...nextauth%5D.ts for credentialHelpers

or refactor getAccessToken() to support this as well

@joshirohit100 joshirohit100 added enhancement New feature or request triage A new issue that needs triage labels Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage A new issue that needs triage
Projects
None yet
Development

No branches or pull requests

1 participant