next-drupal
next-drupal copied to clipboard
Oauth2 authorization not uses/considers the fetcher and getAccessToken() directly calls fetch() method
https://github.com/chapter-three/next-drupal/blob/main/packages/next-drupal/src/client.ts#L1323 - Directly calls the fetch()
method while calling drupal api to get the access token and not considers/uses the fetcher if added any.
Use case -
- My drupal / backend url is SSO protected. This means I need to pass some extra param (some code) to url or as cookie to bypass the SSO
- This means, getAccessToken() won't work for me and I have to override the auth mechanism and can not use OOTB thing
Sol - use/check the fetcher with the getAccessToken()
See https://github.com/acquia/next-acms/wiki/Using-Next.js-with-Acquia-Cloud-IDE for more info :)
Ah. Nice catch. We'll fix this. Thank you.
Pull Request - https://github.com/chapter-three/next-drupal/pull/287