mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #1965 from overleaf/jel-remove-v1-login
Remove login to v1 via v2 GitOrigin-RevId: e5ba86786d14c5a2be87aff6b38cfd807b5cd053
This commit is contained in:
parent
0b938927af
commit
4cf480a448
4 changed files with 1 additions and 27 deletions
|
@ -63,15 +63,6 @@ module.exports = RedirectManager = {
|
|||
;({ url } = target)
|
||||
}
|
||||
|
||||
// Special handling for redirecting to v1, to ensure that query params
|
||||
// are encoded
|
||||
if (target.authWithV1) {
|
||||
url = `/sign_in_to_v1?${querystring.stringify({
|
||||
return_to: url + getQueryString(req)
|
||||
})}`
|
||||
return res.redirect(code, url)
|
||||
}
|
||||
|
||||
if (target.baseUrl != null) {
|
||||
url = `${target.baseUrl}${url}`
|
||||
}
|
||||
|
|
|
@ -174,14 +174,7 @@ block content
|
|||
div
|
||||
a(id="sessions-link", href="/user/sessions") #{translate("manage_sessions")}
|
||||
|
||||
if settings.overleaf && !hasFeature('oauth') && !previewOauth
|
||||
hr
|
||||
p
|
||||
| To manage your account's connection to Google, Twitter, ORCID and IEEE, please
|
||||
|
|
||||
a(href="/sign_in_to_v1?return_to=/users/edit#linked-accounts") click here
|
||||
| .
|
||||
else if hasFeature('oauth') || previewOauth
|
||||
if hasFeature('oauth') || previewOauth
|
||||
hr
|
||||
include settings/user-oauth
|
||||
|
||||
|
|
|
@ -141,7 +141,6 @@ module.exports =
|
|||
},
|
||||
'/redirect/qs': '/destination/qs'
|
||||
'/docs_v1': {
|
||||
authWithV1: true
|
||||
url: '/docs'
|
||||
}
|
||||
|
||||
|
|
|
@ -85,13 +85,4 @@ describe('RedirectUrls', function() {
|
|||
return done()
|
||||
}
|
||||
))
|
||||
|
||||
it('redirects to /sign_in_to_v1 with authWithV1 setting', done =>
|
||||
assertRedirect(
|
||||
'get',
|
||||
'/docs_v1?zip_uri=http%3A%2F%2Foverleaf.test%2Ffoo%3Fbar%3Dbaz%26qux%3Dthing&bar=baz',
|
||||
302,
|
||||
'/sign_in_to_v1?return_to=%2Fdocs%3Fzip_uri%3Dhttp%253A%252F%252Foverleaf.test%252Ffoo%253Fbar%253Dbaz%2526qux%253Dthing%26bar%3Dbaz',
|
||||
done
|
||||
))
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue