got sso working
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
userName,
|
userName,
|
||||||
@@ -194,19 +195,19 @@ in {
|
|||||||
# 1. Visit https://social.wyattjmiller.com/settings/applications
|
# 1. Visit https://social.wyattjmiller.com/settings/applications
|
||||||
# 2. Create a new application with the redirect URI:
|
# 2. Create a new application with the redirect URI:
|
||||||
# https://chat.wyattjmiller.com/_matrix/client/v3/login/sso/redirect/oidc-mastodon
|
# https://chat.wyattjmiller.com/_matrix/client/v3/login/sso/redirect/oidc-mastodon
|
||||||
# and scopes: read:accounts
|
# and scopes: profile
|
||||||
# 3. Write the Application ID → /var/lib/tuwunel/mastodon-oauth-client-id (chmod 400, owned by tuwunel)
|
# 3. Write the Client Key → /var/lib/private/tuwunel/matrix-oauth-client-id (chmod 400, owned by tuwunel)
|
||||||
# Write the Client Secret → /var/lib/tuwunel/mastodon-oauth-client-secret
|
# Write the Client Secret → /var/lib/private/tuwunel/matrix-oauth-client-secret
|
||||||
# 4. nixos-rebuild switch (or restart tuwunel.service)
|
# 4. nixos-rebuild switch (or restart tuwunel.service)
|
||||||
identity_provider= [
|
identity_provider = [
|
||||||
{
|
{
|
||||||
brand = "Mastodon";
|
brand = "Mastodon";
|
||||||
issuer_url = "https://${mastodonFqdn}";
|
issuer_url = "https://${mastodonFqdn}";
|
||||||
id = mastodonOauthClientId;
|
# id = mastodonOauthClientId;
|
||||||
callback_url = "https://${matrixFqdn}/_matrix/client/v3/login/sso/callback/${mastodonOauthClientId}";
|
callback_url = "https://${matrixFqdn}/_matrix/client/unstable/login/sso/callback/${lib.removeSuffix "\n" (mastodonOauthClientId)}";
|
||||||
discovery_url = "https://${mastodonFqdn}/.well-known/oauth-authorization-server";
|
discovery_url = "https://${mastodonFqdn}/.well-known/oauth-authorization-server";
|
||||||
client_id = mastodonOauthClientId;
|
client_id = lib.removeSuffix "\n" (mastodonOauthClientId);
|
||||||
client_secret = mastodonOauthClientSecret;
|
client_secret = lib.removeSuffix "\n" (mastodonOauthClientSecret);
|
||||||
scope = ["profile"];
|
scope = ["profile"];
|
||||||
userid_claims = ["preferred_username"];
|
userid_claims = ["preferred_username"];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user