Skip to content

Commit

Permalink
fix: truly replace .flat() to support Node <11 again (#1691)
Browse files Browse the repository at this point in the history
  • Loading branch information
fxamauri committed Apr 11, 2021
1 parent 63171a0 commit d1dbfe1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/lib/oauth/state-handler.js
Expand Up @@ -41,7 +41,7 @@ export async function handleCallback (req, res) {
export async function handleSignin (req, res) {
const { provider, baseUrl, basePath, csrfToken } = req.options
try {
if (![provider.protection].flat().includes('state')) { // Provider does not support state, nothing to do.
if (!provider.protection.includes('state')) { // Provider does not support state, nothing to do.
return
}

Expand Down

1 comment on commit d1dbfe1

@vercel
Copy link

@vercel vercel bot commented on d1dbfe1 Apr 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.