element-hq / element-hq/synapse

Outdated Auth0 OIDC Docs

Open
#16,753 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#16753](https://github.com/matrix-org/synapse/issues/16753).

---

**Description:**

The current docs for using Auth0 (snippet below) suggest using [Rules](https://auth0.com/docs/customize/rules) to set user attributes, but Rules is being deprecated in favour of Actions. Docs on the migration can be found [here](https://auth0.com/docs/customize/actions/migrate/migrate-from-rules-to-actions).

New Auth0 users are unable to follow the docs as they are unable to create Rules. Existing users aren't yet affected.

```
function addPersistenceAttribute(user, context, callback) {
user.user_metadata = user.user_metadata || {};
user.user_metadata.preferred_username = user.user_metadata.preferred_username || user.user_id;
context.idToken.preferred_username = user.user_metadata.preferred_username;

auth0.users.updateUserMetadata(user.user_id, user.user_metadata)
.then(function(){
callback(null, user, context);
})
.catch(function(err){
callback(err);
});
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.