mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
ajusted button to redirect to good route
This commit is contained in:
parent
8bb62b8842
commit
e51f29c5d2
1 changed files with 6 additions and 2 deletions
|
|
@ -28,6 +28,10 @@ const AuthSelection: React.FC = () => {
|
||||||
// Logique d'authentification pour Simple Login
|
// Logique d'authentification pour Simple Login
|
||||||
console.log('Simple Login Data:', simpleLoginData);
|
console.log('Simple Login Data:', simpleLoginData);
|
||||||
};
|
};
|
||||||
|
const handleAuthLogin = (provider: string) => {
|
||||||
|
window.location.href = 'http://localhost:3000/api/auth/' + provider;
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="auth-selection-page">
|
<div className="auth-selection-page">
|
||||||
<h1>Connexion</h1>
|
<h1>Connexion</h1>
|
||||||
|
|
@ -60,7 +64,7 @@ const AuthSelection: React.FC = () => {
|
||||||
const provider = authData[providerKey];
|
const provider = authData[providerKey];
|
||||||
if (provider.type === 'oauth') {
|
if (provider.type === 'oauth') {
|
||||||
return (
|
return (
|
||||||
<button key={providerKey} className="provider-btn oauth-btn" onClick={() => console.log(`${providerKey} OAuth Login Clicked`)}>
|
<button key={providerKey} className="provider-btn oauth-btn" onClick={() => handleAuthLogin(providerKey)}>
|
||||||
Continuer avec {providerKey}
|
Continuer avec {providerKey}
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
|
|
@ -75,7 +79,7 @@ const AuthSelection: React.FC = () => {
|
||||||
const provider = authData[providerKey];
|
const provider = authData[providerKey];
|
||||||
if (provider.type === 'oidc') {
|
if (provider.type === 'oidc') {
|
||||||
return (
|
return (
|
||||||
<button key={providerKey} className="provider-btn oidc-btn" onClick={() => console.log(`${providerKey} OIDC Login Clicked`)}>
|
<button key={providerKey} className="provider-btn oauth-btn" onClick={() => handleAuthLogin(providerKey)}>
|
||||||
Continuer avec {providerKey}
|
Continuer avec {providerKey}
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue