OAuth setup assistance #2787
Replies: 2 comments
-
I'm struggling with the same issue with my Authentik instance.
I've tried it with two base url values. |
Beta Was this translation helpful? Give feedback.
-
I also just tried setting up OAuth with Authentik. Registering new users works perfectly, but trying to link an existing user raises the "Registration Attempted but not initialized" exception. This happens on the following line: Lychee/app/Http/Controllers/OauthController.php Lines 96 to 98 in 6fc3ec6 This is not down to an invalid configuration of the OAuth setup, but rather laravel not accepting the signed URL it generated. Thus, no matter what provider is chosen, this error will occur. I had a look at the full URL (as seen by the server), just before checking the signature's validity: public function register(string $provider) {
die(Request::fullUrl());
[...]
} This resulted in I managed to get the signature-check working by changing the following functions in
public function register(string $provider) {
Auth::user() ?? throw new UnauthenticatedException();
if (!Request::hasValidSignatureWhileIgnoring(["/auth/$provider/register"])) {
throw new UnauthorizedException('Registration attempted but not initialized.');
}
[...]
}
private function withUserData(): array {
[...]
$route = URL::signedRoute(
name: 'oauth-register',
parameters: ['provider' => $provider->value],
expiration: now()->addMinutes(5),
absolute: true)
[...]
} This is not a perfect solution, as the URL-parameter that should be ignored is most likely coming from the I will open a new merge request to hopefully get this fixed. |
Beta Was this translation helpful? Give feedback.
-
Hi! I'm having trouble setting up OAuth in version 6.1.2, and I'm not really sure what I'm doing wrong. Can anyone assist?
I've created apps in both Google and Github (to confirm it wasn't a Google-specific issue), set the
client_id
andclient_secret
for each in the.env
, and I can see both available to set up on my user profile.However, when I go to connect I get an error telling me
Registration attempted but not initialized.
The logs aren't any more informative:

Beta Was this translation helpful? Give feedback.
All reactions