You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to do notifications we need a way of getting user details. E.g. when a ride gets cancelled we need to get the user's email address and name, when a driver withdraws we need to be able to email the facilitator, sometimes we need to be able to email all the drivers etc.
It's probably possible to do this by querying auth0 directly, but I think it'll be simpler if we just keep that data in our database and have Auth0 sync it.
There's a few ways to achieve this, but I think the best way is probably to sync users from Auth0 to our database, then we can use our database from then on. In order to do this we'll need to figure out how to make it so that changes (new users, changes to user details like email address changes) end up getting synced to our database. There are hooks in Auth0 that can probably be set up to do this, and that seems like the best bet. If that fails, there's also:
Auth0 webhooks, which look a bit complicated
Grabbing things on a recurring basis (which means they might get out of date)
Copying user data across on login (also means they might get out of date)
In order to make the Auth0 hook idea work, we'll need to both create a hook in Auth0 that sends data to our app when user information is created or changes, and also create an API in our app that receives the data in a secure way. This will probably involve having some kind of shared secret.
Criteria
When a new user is created (by logging in for the first time), our database receives that user's details
When a user's details change in Auth0 (e.g. name, roles etc), our database receives the new details. Hopefully this caters for changes that flow through from Facebook etc.
Our database keeps track of users':
Name
Email address
Roles
The text was updated successfully, but these errors were encountered:
In order to do notifications we need a way of getting user details. E.g. when a ride gets cancelled we need to get the user's email address and name, when a driver withdraws we need to be able to email the facilitator, sometimes we need to be able to email all the drivers etc.
It's probably possible to do this by querying auth0 directly, but I think it'll be simpler if we just keep that data in our database and have Auth0 sync it.
There's a few ways to achieve this, but I think the best way is probably to sync users from Auth0 to our database, then we can use our database from then on. In order to do this we'll need to figure out how to make it so that changes (new users, changes to user details like email address changes) end up getting synced to our database. There are hooks in Auth0 that can probably be set up to do this, and that seems like the best bet. If that fails, there's also:
In order to make the Auth0 hook idea work, we'll need to both create a hook in Auth0 that sends data to our app when user information is created or changes, and also create an API in our app that receives the data in a secure way. This will probably involve having some kind of shared secret.
Criteria
The text was updated successfully, but these errors were encountered: