Overview#
This describes how to authenticate with Drupal using Nuxt 3 and @sidebase/nuxt-auth.
Background#
The following article introduced a method for authenticating with GakuNin RDM.
The following article introduced a method for using Drupal OAuth from Next.js.
Using these as reference, we use Drupal OAuth from Nuxt 3.
Method#
The source code can be found in the following repository.
https://github.com/nakamura196/nuxt-rdm
Specifically, the implementation is here.
https://github.com/nakamura196/nuxt-rdm/blob/main/server/api/auth/[…].ts
Summary#
There may be some errors, but I hope this serves as a helpful reference.