Explorar el Código

Update Mastodon SSO instructions (#15587)

tags/v1.84.0rc1
villepeh hace 1 año
committed by GitHub
padre
commit
aa5c0592e7
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: 4AEE18F83AFDEB23
Se han modificado 2 ficheros con 5 adiciones y 2 borrados
  1. +1
    -0
      changelog.d/15587.doc
  2. +4
    -2
      docs/openid.md

+ 1
- 0
changelog.d/15587.doc Ver fichero

@@ -0,0 +1 @@
Update and improve Mastodon Single Sign-On documentation.

+ 4
- 2
docs/openid.md Ver fichero

@@ -569,7 +569,7 @@ You should receive a response similar to the following. Make sure to save it.
{"client_id":"someclientid_123","client_secret":"someclientsecret_123","id":"12345","name":"my_synapse_app","redirect_uri":"https://[synapse_public_baseurl]/_synapse/client/oidc/callback","website":null,"vapid_key":"somerandomvapidkey_123"} {"client_id":"someclientid_123","client_secret":"someclientsecret_123","id":"12345","name":"my_synapse_app","redirect_uri":"https://[synapse_public_baseurl]/_synapse/client/oidc/callback","website":null,"vapid_key":"somerandomvapidkey_123"}
``` ```


As the Synapse login mechanism needs an attribute to uniquely identify users, and Mastodon's endpoint does not return a `sub` property, an alternative `subject_claim` has to be set. Your Synapse configuration should include the following:
As the Synapse login mechanism needs an attribute to uniquely identify users, and Mastodon's endpoint does not return a `sub` property, an alternative `subject_template` has to be set. Your Synapse configuration should include the following:


```yaml ```yaml
oidc_providers: oidc_providers:
@@ -585,7 +585,9 @@ oidc_providers:
scopes: ["read"] scopes: ["read"]
user_mapping_provider: user_mapping_provider:
config: config:
subject_claim: "id"
subject_template: "{{ user.id }}"
localpart_template: "{{ user.username }}"
display_name_template: "{{ user.display_name }}"
``` ```


Note that the fields `client_id` and `client_secret` are taken from the CURL response above. Note that the fields `client_id` and `client_secret` are taken from the CURL response above.


Cargando…
Cancelar
Guardar