-
Notifications
You must be signed in to change notification settings - Fork 9
Auth0 Setup
Iak edited this page Feb 2, 2023
·
1 revision
- Create new application with name
proceed-ms-server
- This gives the MS Server the permissions to create, read, update and delete users on the Authorization Server
- Create new database with name
PROCEED
- Add new rule with name
Username as preferred username
and the following code:
function (user, context, callback) {
user.preferred_username = user.username;
return callback(null, user, context);
}
- Add new pre user registration hook with name
fill-preferred-username
and the following code:
/**
@param {object} user - The user being created
@param {string} user.tenant - Auth0 tenant name
@param {string} user.username - user name
@param {string} user.password - user's password
@param {string} user.email - email
@param {boolean} user.emailVerified - is e-mail verified?
@param {string} user.phoneNumber - phone number
@param {boolean} user.phoneNumberVerified - is phone number verified?
@param {object} context - Auth0 connection and other context info
@param {string} context.renderlanguage - language used by signup flow
@param {string} context.request.ip - ip address
@param {string} context.request.language - language of the client agent
@param {object} context.connection - information about the Auth0 connection
@param {object} context.connection.id - connection id
@param {object} context.connection.name - connection name
@param {object} context.connection.tenant - connection tenant
@param {object} context.webtask - webtask context
@param {function} cb - function (error, response)
*/
module.exports = function (user, context, cb) {
var response = {};
user.preferred_username = user.username;
response.user = user;
cb(null, response);
};