Skip to content

Instantly share code, notes, and snippets.

View eniodev's full-sized avatar
🌐
Going global

Énio Carlos eniodev

🌐
Going global
View GitHub Profile
@eniodev
eniodev / next-auth-usage.ts
Created August 3, 2023 01:00
next auth usage : )
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import NextAuth from 'next-auth/next';
import GoogleProvider from 'next-auth/providers/google'
export const authOptions = {
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_CLIENT_ID as string,
clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,
}),
@eniodev
eniodev / openai_api_config.js
Last active April 19, 2023 05:09
This is a starter snippet for building applications powered by openAI models
// npm i openai dotenv
import { config } from 'dotenv';
config();
// OpenAI API Configuration
import { Configuration, OpenAIApi } from "openai";
const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY, // Replace this with your key