fix(backend): Update callback domain fallback
This commit is contained in:
parent
0101930536
commit
a9093519c1
2 changed files with 3 additions and 3 deletions
|
@ -257,7 +257,7 @@ if (baseConfig.use.oauth?.github) {
|
|||
redirectUri: `${
|
||||
process.env.BACKEND_OAUTH_GITHUB_CALLBACK_SITE
|
||||
? process.env.BACKEND_OAUTH_GITHUB_CALLBACK_SITE
|
||||
: 'https://next.freesewing.org'
|
||||
: 'https://freesewing.org'
|
||||
}/signin/callback/github`,
|
||||
}
|
||||
baseConfig.oauth.github.url = (state) =>
|
||||
|
@ -279,7 +279,7 @@ if (baseConfig.use.oauth?.google) {
|
|||
redirectUri: `${
|
||||
process.env.BACKEND_OAUTH_GOOGLE_CALLBACK_SITE
|
||||
? process.env.BACKEND_OAUTH_GOOGLE_CALLBACK_SITE
|
||||
: 'https://next.freesewing.org'
|
||||
: 'https://freesewing.org'
|
||||
}/signin/callback/google`,
|
||||
}
|
||||
baseConfig.oauth.google.url = (state) =>
|
||||
|
|
|
@ -919,7 +919,7 @@ UserModel.prototype.passwordSignIn = async function (req) {
|
|||
if (Array.isArray(check)) [result, mfaScratchCodes] = check
|
||||
else result = check
|
||||
if (!result) return this.setResponse(401, 'signInFailed')
|
||||
if (mfaScratchCodes.length !== this.clear.data.mfaScratchCodes.length) {
|
||||
if (mfaScratchCodes && mfaScratchCodes.length !== this.clear.data.mfaScratchCodes.length) {
|
||||
// Scratch code was used, update record to remove it
|
||||
await this.update({ data: { ...this.clear.data, mfaScratchCodes } })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue