-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauth.config.js
More file actions
38 lines (36 loc) · 1.1 KB
/
auth.config.js
File metadata and controls
38 lines (36 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import GitHub from 'next-auth/providers/github'
import Google from 'next-auth/providers/google'
import MailRu from 'next-auth/providers/mailru'
import Vk from 'next-auth/providers/vk'
import Yandex from 'next-auth/providers/yandex'
const basePath = process.env.BASE_PATH ?? ''
export default {
basePath: `${basePath}/api/auth`,
providers: [
GitHub,
Google,
MailRu,
Yandex,
{
...Vk({
checks: []
}),
token: {
url: 'https://oauth.vk.com/access_token?v=5.131',
conform: async (response) => {
const data = await response.json()
return new Response(
JSON.stringify({
token_type: 'dpop',
...data,
}),
{
headers: { "content-type": "application/json" },
status: response.status
}
)
}
}
}
]
}