This commit is contained in:
anoadragon453 committed 2026-09-11 13:17:55 +00:00
1 parent dd909061f5
commit e8d70adbc3
113 files changed
+140 -146

No files matched your search

+12 -16
View File
@@ -37,7 +37,7 @@
const path_to_root = "";
const default_light_theme = "light";
const default_dark_theme = "navy";
window.path_to_searchindex_js = "searchindex-9e3badfd.js";
window.path_to_searchindex_js = "searchindex-e1b1a2b1.js";
</script>
<!-- Start loading toc.js asap -->
<script src="toc-64310643.js"></script>
@@ -307,18 +307,15 @@ has more information on setting up SiWA.</p>
<h3 id="auth0"><a class="header" href="#auth0">Auth0</a></h3>
<p><a href="https://auth0.com/">Auth0</a> is a hosted SaaS IdP solution.</p>
<ol>
<li>
<p>Create a regular web application for Synapse</p>
</li>
<li>
<p>Set the Allowed Callback URLs to <code>[synapse public baseurl]/_synapse/client/oidc/callback</code></p>
</li>
<li>
<p>Add a rule with any name to add the <code>preferred_username</code> claim.
(See https://auth0.com/docs/customize/rules/create-rules for more information on how to create rules.)</p>
<details>
<summary>Code sample</summary>
<pre><code class="language-js">function addPersistenceAttribute(user, context, callback) {
<li>Create a regular web application for Synapse</li>
<li>Set the Allowed Callback URLs to <code>[synapse public baseurl]/_synapse/client/oidc/callback</code></li>
<li>Add a rule with any name to add the <code>preferred_username</code> claim.
(See https://auth0.com/docs/customize/rules/create-rules for more information on how to create rules.)</li>
</ol>
<details>
<summary>Code sample</summary>
<pre><code>```js
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;
@@ -331,10 +328,9 @@ has more information on setting up SiWA.</p>
callback(err);
});
}
```
</code></pre>
</details></li>
</ol>
</details>
<p>Synapse config:</p>
<pre><code class="language-yaml">oidc_providers:
- idp_id: auth0