name('login'); Route::middleware('guest')->group(function () { Route::get('/auth/redirect', [PireonAuthController::class, 'redirect']) ->name('auth.redirect'); Route::get('/auth/callback', [PireonAuthController::class, 'callback']) ->name('auth.callback'); }); Route::post('/logout', [PireonAuthController::class, 'logout']) ->middleware('auth') ->name('logout'); /* |-------------------------------------------------------------------------- | Locale switching |-------------------------------------------------------------------------- */ Route::get('/locale/{locale}', LocaleController::class)->name('locale.switch'); /* |-------------------------------------------------------------------------- | API documentation |-------------------------------------------------------------------------- | | Browsable docs for both APIs, rendered from public/openapi.yaml. Readable | without signing in on purpose: the people who need it most are writing the | public frontend and have no reason to hold a panel account, and the | specification describes endpoints rather than secrets. | | To keep it to the collective instead, wrap this route in the `auth` | middleware and move openapi.yaml out of public/. | */ Route::get('/docs/api', DocsController::class)->name('docs.api');