-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauth.ts
More file actions
27 lines (26 loc) · 771 Bytes
/
auth.ts
File metadata and controls
27 lines (26 loc) · 771 Bytes
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
import { betterAuth } from 'better-auth';
import { nextCookies } from 'better-auth/next-js';
import Database from 'better-sqlite3';
export const auth = betterAuth({
database: new Database('./sqlite.db'),
plugins: [nextCookies()],
socialProviders: {
spotify: {
clientId: process.env.AUTH_SPOTIFY_ID!,
clientSecret: process.env.AUTH_SPOTIFY_SECRET!,
scope: [
'user-read-recently-played',
'user-read-playback-state',
'user-top-read',
'user-modify-playback-state',
'user-read-currently-playing',
'user-follow-read',
'playlist-read-private',
'user-read-email',
'user-read-private',
'user-library-read',
'playlist-read-collaborative',
],
},
},
});