Some checks failed
Deploy to production / deploy (push) Failing after 49s
- Created OAuth credentials setup guide for Google, Microsoft, Keycloak, ORY, and ZITADEL. - Added migration for oauth_identity table to store OAuth identities linked to users. - Implemented OAuthIdentity model for managing OAuth identities in the database. - Developed oauthService to handle OAuth login, user creation, and identity linking. - Created OAuthCallbackView and OAuthUserCallbackView components for handling OAuth responses in the frontend. - Added error handling and user feedback during the OAuth process.
24 lines
1.0 KiB
JavaScript
24 lines
1.0 KiB
JavaScript
import { Router } from 'express';
|
|
import AuthController from '../controllers/authController.js';
|
|
|
|
const router = Router();
|
|
const authController = new AuthController();
|
|
|
|
// Öffentliche Routen (keine Authentifizierung erforderlich)
|
|
router.post('/register', authController.register);
|
|
router.post('/login', authController.login);
|
|
router.post('/forgot-password', authController.forgotPassword);
|
|
router.post('/activate', authController.activateAccount);
|
|
router.get('/oauth/providers', authController.oauthProviders);
|
|
router.get('/oauth/:provider/start', authController.oauthStart);
|
|
router.post('/oauth/exchange', authController.oauthExchange);
|
|
|
|
// Geschützte Routen (Authentifizierung erforderlich)
|
|
router.get('/logout', authController.logout);
|
|
router.get('/oauth/user/identities', authController.oauthUserIdentities);
|
|
router.get('/oauth/user/:provider/start', authController.oauthUserStart);
|
|
router.post('/oauth/user/exchange', authController.oauthUserExchange);
|
|
router.delete('/oauth/user/:identityId', authController.oauthUserRemove);
|
|
|
|
export default router;
|