Browse Source

Finished Github OAuth

features/oauth
astria 4 months ago
parent
commit
b0d78243bb
  1. 10
      backend/logs/access.log
  2. 3
      frontend/src/pages/Login.jsx
  3. 2
      frontend/src/pages/Register.jsx

10
backend/logs/access.log

@ -8430,3 +8430,13 @@
[2025-08-22 16:38:44.212] [undefined] GET(/search): successfully found user with username a with status 200
[2025-08-22 16:38:45.263] [undefined] GET(/search): try to search user by username s
[2025-08-22 16:38:45.267] [undefined] GET(/search): successfully found user with username s with status 200
[2025-08-22 17:16:45.647] [undefined] GET(/:id/channel): try to retrieve channel of user 1
[2025-08-22 17:16:45.652] [undefined] GET(/:id/channel): failed to retrieve channel of user 1 because it doesn't exist with status 404
[2025-08-22 17:16:45.657] [undefined] GET(/:id/history): try to retrieve history of user 1
[2025-08-22 17:16:45.662] [undefined] GET(/:id/history): failed to retrieve history of user 1 because it doesn't exist with status 404
[2025-08-22 17:16:45.673] [undefined] GET(/user/:id): Playlists retrieved for user with id 1 with status 200
[2025-08-22 17:20:25.391] [undefined] GET(/:id/channel): try to retrieve channel of user 1
[2025-08-22 17:20:25.395] [undefined] GET(/:id/channel): failed to retrieve channel of user 1 because it doesn't exist with status 404
[2025-08-22 17:20:25.400] [undefined] GET(/:id/history): try to retrieve history of user 1
[2025-08-22 17:20:25.407] [undefined] GET(/:id/history): failed to retrieve history of user 1 because it doesn't exist with status 404
[2025-08-22 17:20:25.418] [undefined] GET(/user/:id): Playlists retrieved for user with id 1 with status 200

3
frontend/src/pages/Login.jsx

@ -2,6 +2,7 @@ import React, { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { useAuth } from '../contexts/AuthContext';
import Navbar from '../components/Navbar';
import GitHubLoginButton from '../components/GitHubLoginButton';
export default function Login() {
const [formData, setFormData] = useState({
@ -104,6 +105,7 @@ export default function Login() {
</div>
</div>
<button
type="submit"
disabled={loading}
@ -111,6 +113,7 @@ export default function Login() {
>
{loading ? 'Connexion...' : 'Se connecter'}
</button>
<GitHubLoginButton className="mt-1 cursor-pointer" />
</form>
<div className="mt-6 text-center">

2
frontend/src/pages/Register.jsx

@ -237,7 +237,7 @@ export default function Register() {
</button>
</form>
<GitHubLoginButton/>
<GitHubLoginButton className="mt-4 cursor-pointer" />
<div className="mt-6 text-center">
<p className="text-gray-600">

Loading…
Cancel
Save