Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
34efb4c6
Unverified
Commit
34efb4c6
authored
4 years ago
by
Richard van der Hoff
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add notes on integrating with Facebook for SSO login. (#9244)
parent
00e97a77
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/9244.doc
+1
-0
1 addition, 0 deletions
changelog.d/9244.doc
docs/openid.md
+48
-5
48 additions, 5 deletions
docs/openid.md
with
49 additions
and
5 deletions
changelog.d/9244.doc
0 → 100644
+
1
−
0
View file @
34efb4c6
Add notes on integrating with Facebook for SSO login.
This diff is collapsed.
Click to expand it.
docs/openid.md
+
48
−
5
View file @
34efb4c6
...
@@ -44,7 +44,7 @@ as follows:
...
@@ -44,7 +44,7 @@ as follows:
To enable the OpenID integration, you should then add a section to the
`oidc_providers`
To enable the OpenID integration, you should then add a section to the
`oidc_providers`
setting in your configuration file (or uncomment one of the existing examples).
setting in your configuration file (or uncomment one of the existing examples).
See
[
sample_config.yaml
](
./sample_config.yaml
)
for some sample settings, as well as
See
[
sample_config.yaml
](
./sample_config.yaml
)
for some sample settings, as well as
the text below for example configurations for specific providers.
the text below for example configurations for specific providers.
## Sample configs
## Sample configs
...
@@ -52,11 +52,11 @@ the text below for example configurations for specific providers.
...
@@ -52,11 +52,11 @@ the text below for example configurations for specific providers.
Here are a few configs for providers that should work with Synapse.
Here are a few configs for providers that should work with Synapse.
### Microsoft Azure Active Directory
### Microsoft Azure Active Directory
Azure AD can act as an OpenID Connect Provider. Register a new application under
Azure AD can act as an OpenID Connect Provider. Register a new application under
*App registrations*
in the Azure AD management console. The RedirectURI for your
*App registrations*
in the Azure AD management console. The RedirectURI for your
application should point to your matrix server:
`[synapse public baseurl]/_synapse/oidc/callback`
application should point to your matrix server:
`[synapse public baseurl]/_synapse/oidc/callback`
Go to
*Certificates & secrets*
and register a new client secret. Make note of your
Go to
*Certificates & secrets*
and register a new client secret. Make note of your
Directory (tenant) ID as it will be used in the Azure links.
Directory (tenant) ID as it will be used in the Azure links.
Edit your Synapse config file and change the
`oidc_config`
section:
Edit your Synapse config file and change the
`oidc_config`
section:
...
@@ -118,7 +118,7 @@ oidc_providers:
...
@@ -118,7 +118,7 @@ oidc_providers:
```
```
### [Keycloak][keycloak-idp]
### [Keycloak][keycloak-idp]
[
Keycloak
][
keycloak-idp
]
is an opensource IdP maintained by Red Hat.
[
Keycloak
][
keycloak-idp
]
is an opensource IdP maintained by Red Hat.
Follow the
[
Getting Started Guide
](
https://www.keycloak.org/getting-started
)
to install Keycloak and set up a realm.
Follow the
[
Getting Started Guide
](
https://www.keycloak.org/getting-started
)
to install Keycloak and set up a realm.
...
@@ -194,7 +194,7 @@ Synapse config:
...
@@ -194,7 +194,7 @@ Synapse config:
```
yaml
```
yaml
oidc_providers
:
oidc_providers
:
-
idp_id
:
auth0
-
idp_id
:
auth0
idp_name
:
Auth0
idp_name
:
Auth0
issuer
:
"
https://your-tier.eu.auth0.com/"
# TO BE FILLED
issuer
:
"
https://your-tier.eu.auth0.com/"
# TO BE FILLED
client_id
:
"
your-client-id"
# TO BE FILLED
client_id
:
"
your-client-id"
# TO BE FILLED
...
@@ -307,3 +307,46 @@ oidc_providers:
...
@@ -307,3 +307,46 @@ oidc_providers:
localpart_template
:
'
{{
user.nickname
}}'
localpart_template
:
'
{{
user.nickname
}}'
display_name_template
:
'
{{
user.name
}}'
display_name_template
:
'
{{
user.name
}}'
```
```
### Facebook
Like Github, Facebook provide a custom OAuth2 API rather than an OIDC-compliant
one so requires a little more configuration.
0.
You will need a Facebook developer account. You can register for one
[
here
](
https://developers.facebook.com/async/registration/
)
.
1.
On the
[
apps
](
https://developers.facebook.com/apps/
)
page of the developer
console, "Create App", and choose "Build Connected Experiences".
2.
Once the app is created, add "Facebook Login" and choose "Web". You don't
need to go through the whole form here.
3.
In the left-hand menu, open "Products"/"Facebook Login"/"Settings".
*
Add
`[synapse public baseurl]/_synapse/oidc/callback`
as an OAuth Redirect
URL.
4.
In the left-hand menu, open "Settings/Basic". Here you can copy the "App ID"
and "App Secret" for use below.
Synapse config:
```
yaml
-
idp_id
:
facebook
idp_name
:
Facebook
idp_brand
:
"
org.matrix.facebook"
# optional: styling hint for clients
discover
:
false
issuer
:
"
https://facebook.com"
client_id
:
"
your-client-id"
# TO BE FILLED
client_secret
:
"
your-client-secret"
# TO BE FILLED
scopes
:
[
"
openid"
,
"
email"
]
authorization_endpoint
:
https://facebook.com/dialog/oauth
token_endpoint
:
https://graph.facebook.com/v9.0/oauth/access_token
user_profile_method
:
"
userinfo_endpoint"
userinfo_endpoint
:
"
https://graph.facebook.com/v9.0/me?fields=id,name,email,picture"
user_mapping_provider
:
config
:
subject_claim
:
"
id"
display_name_template
:
"
{{
user.name
}}"
```
Relevant documents:
*
https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow
*
Using Facebook's Graph API: https://developers.facebook.com/docs/graph-api/using-graph-api/
*
Reference to the User endpoint: https://developers.facebook.com/docs/graph-api/reference/user
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment