Using Auth0 with Reindex

  • I will cover common patterns for using Auth0 in Reindex-copying the profile info and using the Auth0 API.
  • You can call the mutation manually in your login function or use a Relay Mutation.
  • To maintain privacy, only the user can read this field, so, if you want to reveal some of the profile info to other users, you need to copy it.
  • export default function login ( auth0Options, reindex ) { const lock = new Auth0Lock( ‘YOUR-AUTH0-CLIENT-ID’ , ‘YOUR-AUTH0-SECRET’ ); lock.show(auth0Options, async (err, profile, idToken) => { if (err) { console .log(err); return ; } await reindex.loginWithToken( ‘auth0’ , idToken) .catch((err) => { console .log(err) }); await reindex.query( ` mutation($input: _UpdateUserInput!
  • Let’s write a function that opens the Auth0 lock and logs the user into Reindex.

Read the full article, click here.


@freiksenet: “I’ve written a guide about using @reindexio and @auth0 together in #reactjs and #reactnative.”


Auth0 is an amazing service for handling authentication
in your apps. It not only supports many popular social login APIs, but
also has ready-made libraries and UI components to really speed up your
application development. Reindex supports Auth0 as an authentication
provider,
and we actually use it for our own dashboard app. In this blog post, I’ll describe
various ways to use Auth0 with Reindex.


Using Auth0 with Reindex