Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure AD auth Firefox Only Error #2307

Closed
mvilche opened this issue Oct 5, 2020 · 5 comments
Closed

Azure AD auth Firefox Only Error #2307

mvilche opened this issue Oct 5, 2020 · 5 comments

Comments

@mvilche
Copy link

mvilche commented Oct 5, 2020

Hi.

I have correctly configured and working the integration with Azure AD. Everything works fine in chrome and edge but in firefox when you try to login it returns to login.
In the log laravel.log I see the following when I log in with firefox only:

[2020-10-05 21:31:47] production.ERROR: Acción no definida {"exception":"[object] (BookStack\Exceptions\SocialSignInException(code: 0): Acción no definida at /var/www/html/app/Http/Controllers/Auth/SocialController.php:66)
[stacktrace]
#0 [internal function]: BookStack\Http\Controllers\Auth\SocialController->socialCallback(Object(BookStack\Http\Request), 'azure')
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('socialCallback', Array)
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(BookStack\Http\Controllers\Auth\SocialController), 'socialCallback')
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\Routing\Route->runController()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\Routing\Route->run()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(BookStack\Http\Request))
#7 /var/www/html/app/Http/Middleware/GlobalViewData.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(BookStack\Http\Request))
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): BookStack\Http\Middleware\GlobalViewData->handle(Object(BookStack\Http\Request), Object(Closure))
#9 /var/www/html/app/Http/Middleware/Localization.php(77): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(BookStack\Http\Request))

@ssddanbrown
Copy link
Member

Hi @mvilche,
Sorry to hear you are having issues.

That's an odd problem to have in just a certain browser.
That error appears if a certain "callback action" is not found in the user's session. The session relies on the use of cookies which is where browser differences could affect things.

Here's my two best guesses as to why this might be:

  • You're accessing via a different host in Firefox? This includes the HTTP/HTTPS part. If you start the login process on http then get redirected to https (Or vice verca) then that could count as a new session and then loose that "callback action".
  • Browser plugins or features are stopping the cookies being set consistently. Anything that could affect cookies being set (Privacy plugins) or auto-direct URLs could have an impact. You could try starting in safe mode.

@mvilche
Copy link
Author

mvilche commented Oct 13, 2020

Hi.

Thanks for the reply and the excellent software.

I've been trying multiple options in firefox but it still doesn't work.
The options that you comment check all and all are correct.

I do not realize why it does not work in firefox.
This happens to me on various devices.
Weird chrome and edge work fine.

@ssddanbrown
Copy link
Member

One thing to check here, This could be caused by something in firefox forcing a cookie's "SameSite" value to be strict.

This could also be more of an issue if you're loading BookStack through an iframe, since browsers have recently started treating those scenarios more strictly. In the latest release, We have added options for iframe support but it needs to be configured. Also, The latest releases changes how cookies are set by default which could allow things to work better.

@mvilche
Copy link
Author

mvilche commented Jan 27, 2021

Hi.

Fix with force header cookie with value Lax.

Thanks!

@ssddanbrown
Copy link
Member

Awesome! Will therefore close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants