0

I have a decoupled Drupal site that uses JSON:API to serve an Ionic React app.

I'm currently using the JWT (JSON Web Token Authentication module to enable users to register and log in (alongside the Get JWT on Login module) to the app/Drupal site.

I have used the Email Registration module so that users only need to provide an email address and password to log in, so the sign-up form is very simple.

Now, I want to integrate "sign in with Google" and "sign in with Apple" functionality to make it easier for users on Android and iOS.

Requirements

0

At this time, it doesn't seem like a ready-made solution is available yet for Drupal 9.

Solution: OpenID Connect

One solution is to use the OpenID Connect module with the Simple OAuth module or the OAuth2 Server module. These modules do similar things but OAuth2 Server is less opinionated/more complex to set up.

OpenID Connect module provides support for Google out of the box; Apple support needs to be written, but work is ongoing here.

Solution: Social Auth

The Social Auth family of modules provides both Google and Apple submodules; however, the Social Auth Decoupled module does not have a Drupal 9 release, and it is looking for a new maintainer.

At a minimum, Social Auth Decoupled and Social Auth Google API would need to be updated for Drupal 9, and a Social Auth Sign in with Apple module would need to be written.

So, Social Auth is good if you don't need decoupled login, but if you do need decoupled, you will be writing a lot of code on your own.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.