Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: admin connection & google login #48

Merged
merged 3 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ DB_URL=The postgres database URL (ex: postgres://user:password@host:port/databas
AUTH_SECRET=The secret used to sign the JWT tokens (generate with `openssl rand -hex 32` or https://generate-secret.vercel.app/32)

AUTH_GITHUB_ID=The github app id
AUTH_GITHUB_SECRET=The github app secret
AUTH_GITHUB_SECRET=The github app secret

AUTH_GOOGLE_ID=The google app id
AUTH_GOOGLE_SECRET=The google app secret
2 changes: 2 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ env:
AUTH_SECRET: fake
AUTH_GITHUB_ID: fake
AUTH_GITHUB_SECRET: fake
AUTH_GOOGLE_ID: fake
AUTH_GOOGLE_SECRET: fake

jobs:
format:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ env:
AUTH_SECRET: fake
AUTH_GITHUB_ID: fake
AUTH_GITHUB_SECRET: fake
AUTH_GOOGLE_ID: fake
AUTH_GOOGLE_SECRET: fake

jobs:
format:
Expand Down
16 changes: 16 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/styles/globals.css",
"baseColor": "slate",
"cssVariables": true
},
"aliases": {
"components": "src",
"utils": "@lib/utils"
}
}
4 changes: 4 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ const nextConfig = {
protocol: "https",
hostname: "avatars.githubusercontent.com",
},
{
protocol: "https",
hostname: "*.googleusercontent.com",
},
],
},
};
Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,28 @@
"db:studio": "cross-env SKIP_ENV_VALIDATION=true drizzle-kit studio --host 127.0.0.1 --port 3001"
},
"dependencies": {
"@auth/core": "^0.18.1",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Désinstalle @auth/core (pnpm remove @auth/core) et essaye voir si l'authentification fonctionne sans

"@formatjs/intl-localematcher": "^0.5.1",
"@hookform/resolvers": "^3.3.2",
"@radix-ui/react-aspect-ratio": "^1.0.3",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-slot": "^1.0.2",
"@react-three/fiber": "^8.15.10",
"@t3-oss/env-nextjs": "^0.7.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"drizzle-orm": "^0.29.0",
"framer-motion": "^10.16.4",
"lucide-react": "^0.292.0",
"next": "^14.0.2",
"next-auth": "5.0.0-beta.3",
"postgres": "^3.4.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.48.2",
"tailwind-merge": "^2.0.0",
"tailwindcss": "^3.3.5",
"tailwindcss-animate": "^1.0.7",
"three": "^0.158.0",
"typescript": "^5.2.2",
"zod": "^3.22.4"
Expand Down
104 changes: 104 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/assets/apple.png
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Supprimer ce fichier

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/github.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/google.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions public/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"admin": {
"login": {
"github": "GitHub",
"google": "Google",
"apple": "Apple",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove apple

"choice": "Choose a connection method",
"connection": "Sign in",
"division":"or sign in with",
"pass" : "Password"
},

"signout": "Sign out"
}
}
11 changes: 10 additions & 1 deletion public/locales/fr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"admin": {
"admin": {
"login": {
"github": "Github",
"google": "Google",

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete space

"choice": "Choisissez un moyen de connection",
"connection" : "Se connecter",
"division": "ou connectez-vous avec",
"pass" : "Mot de passe"
},
"signout": "Déconnexion"
}
}
Loading