Skip to content

Instantly share code, notes, and snippets.

@eyenalxai
eyenalxai / auth.ts
Created October 11, 2023 14:53
OAUTH_CALLBACK_ERROR
import { saveUser } from '@/lib/fetch/user'
import { NextAuthOptions } from 'next-auth'
import Spotify from 'next-auth/providers/spotify'
export const authOptions: NextAuthOptions = {
providers: [
Spotify({
clientId: process.env.SPOTIFY_CLIENT_ID!,
clientSecret: process.env.SPOTIFY_CLIENT_SECRET!
})
@eyenalxai
eyenalxai / hsl_to_hex.py
Last active January 11, 2023 13:42
HSL to HEX
def hsl_to_hex(hue: int, saturation_percent: int, lightness_percent: int) -> str:
red, green, blue = hsl_to_rgb(
hue=hue,
saturation_percent=saturation_percent,
lightness_percent=lightness_percent,
)
return rgb_to_hex(red=red, green=green, blue=blue)