mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #1870 from overleaf/spd-invalid-intent-sso
Fix invalid intent errors when logging in with OAuth GitOrigin-RevId: 20f88a24080b41256bd31b9fb55b68a872ded56b
This commit is contained in:
parent
93386bcb8c
commit
ab5b1b6dc4
2 changed files with 9 additions and 0 deletions
|
@ -19,6 +19,7 @@ const UserSessionsManager = require('./UserSessionsManager')
|
|||
const ErrorController = require('../Errors/ErrorController')
|
||||
const logger = require('logger-sharelatex')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Errors = require('../Errors/Errors')
|
||||
const request = require('request')
|
||||
const fs = require('fs')
|
||||
const AuthenticationController = require('../Authentication/AuthenticationController')
|
||||
|
@ -120,6 +121,10 @@ module.exports = UserPagesController = {
|
|||
|
||||
settingsPage(req, res, next) {
|
||||
const user_id = AuthenticationController.getLoggedInUserId(req)
|
||||
const ssoError = req.session.ssoError
|
||||
if (ssoError) {
|
||||
delete req.session.ssoError
|
||||
}
|
||||
logger.log({ user: user_id }, 'loading settings page')
|
||||
const shouldAllowEditingDetails =
|
||||
!__guard__(
|
||||
|
@ -155,6 +160,7 @@ module.exports = UserPagesController = {
|
|||
oauthProviders,
|
||||
req
|
||||
),
|
||||
ssoError: ssoError,
|
||||
thirdPartyIds: UserPagesController._restructureThirdPartyIds(user),
|
||||
previewOauth: req.query.prvw != null
|
||||
})
|
||||
|
|
|
@ -5,6 +5,9 @@ block content
|
|||
.container
|
||||
.row
|
||||
.col-md-12.col-lg-10.col-lg-offset-1
|
||||
if ssoError
|
||||
.alert.alert-danger
|
||||
| #{translate('sso_link_error')}: #{translate(ssoError)}
|
||||
.card
|
||||
.page-header
|
||||
h1 #{translate("account_settings")}
|
||||
|
|
Loading…
Reference in a new issue