mirror of
https://github.com/outline/outline.git
synced 2026-12-01 09:22:14 +03:00
fix: Improve error when email field not returned from OIDC
This commit is contained in:
1 parent
7c8675ce17
commit
223a47af95
1 file changed
+5
@@ -68,6 +68,11 @@ if (OIDC_CLIENT_ID) {
|
||||
// available on the `profile` parameter
|
||||
async function (req, accessToken, refreshToken, profile, done) {
|
||||
try {
|
||||
if (!profile.email) {
|
||||
throw new AuthenticationError(
|
||||
`An email field was not returned in the profile parameter, but is required.`
|
||||
);
|
||||
}
|
||||
const parts = profile.email.split("@");
|
||||
const domain = parts.length && parts[1];
|
||||
|
||||
|
||||
Reference in new issue
Block a user