Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add PKCE support #941

Merged
merged 12 commits into from
Jan 20, 2021
Prev Previous commit
Next Next commit
chore: remove unused param
balazsorban44 committed Jan 19, 2021
commit 810095336ac1b16aa9c5a12066b664ca14f6bc9a
3 changes: 1 addition & 2 deletions src/server/lib/signin/oauth.js
Original file line number Diff line number Diff line change
@@ -2,13 +2,12 @@ import oAuthClient from '../oauth/client'
import { createHash } from 'crypto'
import logger from '../../../lib/logger'

export default async function getAuthorizationUrl (req, codeChallenge) {
export default async function getAuthorizationUrl (req) {
const { provider, csrfToken, pkce } = req.options

const client = oAuthClient(provider)
if (provider.version?.startsWith('2.')) {
// Handle OAuth v2.x

let url = client.getAuthorizeUrl({
...provider.authorizationParams,
...req.body.authorizationParams,