mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 00:34:44 +02:00
Make oauth nullable & remove middleware from oauth callback (#418)
* make oauth nullable * fix oauth callback middleware
This commit is contained in:
parent
c431775b7e
commit
7813b6060c
@ -42,7 +42,7 @@ use App\Notifications\SendPasswordReset as ResetPasswordNotification;
|
|||||||
* @property bool $use_totp
|
* @property bool $use_totp
|
||||||
* @property string|null $totp_secret
|
* @property string|null $totp_secret
|
||||||
* @property \Illuminate\Support\Carbon|null $totp_authenticated_at
|
* @property \Illuminate\Support\Carbon|null $totp_authenticated_at
|
||||||
* @property array $oauth
|
* @property array|null $oauth
|
||||||
* @property bool $gravatar
|
* @property bool $gravatar
|
||||||
* @property \Illuminate\Support\Carbon|null $created_at
|
* @property \Illuminate\Support\Carbon|null $created_at
|
||||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||||
@ -165,7 +165,7 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac
|
|||||||
'language' => 'string',
|
'language' => 'string',
|
||||||
'use_totp' => 'boolean',
|
'use_totp' => 'boolean',
|
||||||
'totp_secret' => 'nullable|string',
|
'totp_secret' => 'nullable|string',
|
||||||
'oauth' => 'array',
|
'oauth' => 'array|nullable',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected function casts(): array
|
protected function casts(): array
|
||||||
|
@ -20,7 +20,7 @@ Route::get('/password/reset/{token}', [Auth\LoginController::class, 'index'])->n
|
|||||||
|
|
||||||
// Endpoints for OAuth
|
// Endpoints for OAuth
|
||||||
Route::get('/oauth/redirect/{driver}', [Auth\OAuthController::class, 'redirect'])->name('auth.oauth.redirect');
|
Route::get('/oauth/redirect/{driver}', [Auth\OAuthController::class, 'redirect'])->name('auth.oauth.redirect');
|
||||||
Route::get('/oauth/callback/{driver}', [Auth\OAuthController::class, 'callback'])->name('auth.oauth.callback');
|
Route::get('/oauth/callback/{driver}', [Auth\OAuthController::class, 'callback'])->name('auth.oauth.callback')->withoutMiddleware('guest');
|
||||||
|
|
||||||
// Apply a throttle to authentication action endpoints, in addition to the
|
// Apply a throttle to authentication action endpoints, in addition to the
|
||||||
// recaptcha endpoints to slow down manual attack spammers even more. 🤷
|
// recaptcha endpoints to slow down manual attack spammers even more. 🤷
|
||||||
|
Loading…
x
Reference in New Issue
Block a user