I'm using next-auth Hazelbase authentication service but when I'm deploying, it says Authorization Server policy requires PKCE to be used for this request
.
Note: Hazelbase is also a service like sign in with google.
Logs Error Screenshot-
[...nextauth.js] file-
import NextAuth from "next-auth"
export default NextAuth({
providers: [
// hazelbase provider
{
id: 'hazelbase',
name: 'Email',
type: 'oauth',
version: '2.0',
authorizationUrl: 'https://api.hazelbase.com/oidc/auth?response_type=code',
requestTokenUrl: 'https://api.hazelbase.com/oidc/auth',
accessTokenUrl: 'https://api.hazelbase.com/oidc/token',
wellKnown: 'https://api.hazelbase.com/oidc/.well-known/openid-configuration',
profileUrl: 'https://api.hazelbase.com/oidc/me',
scope: 'openid profile name email',
protection: 'pkce',
clientId: process.env.HAZELBASE_CLIENT_ID,
params: {
grant_type: 'authorization_code',
},
profile(profile) {
return {
id: profile.sub,
...profile,
};
},
}
]
})