InvalidStateException when login from multiple tabs
MoishyS opened this issue · comments
Socialite Version
1.6.1
Laravel Version
10.4.1
PHP Version
8.1.4
Database Driver & Version
MySql
Description
We only save a single state
in session that gets overwritten next time you login, instead we should save an array of state
and the code
.
This is done correctly in Microsoft.AspNetCore.Authentication.OpenIdConnect, they also store a separate redirect URL for every code
, so you know where to redirect when logging in from multiple tabs.
Steps To Reproduce
- get redirected to Identity Provider on Tab 1
- get redirected to Identity Provider on Tab 2
- Login on Tab 1 - you'll get an InvalidStateException
This seems like a feature request. We'd welcome a PR for us to look at, thanks.