oauth2-gitlab | GitLab Provider for the OAuth 2.0 Client | OAuth library
kandi X-RAY | oauth2-gitlab Summary
kandi X-RAY | oauth2-gitlab Summary
GitLab Provider for the OAuth 2.0 Client
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get the GitHub API client .
- Checks the API response .
- Creates client exception from response .
- Creates an OAuth exception from a response .
- Set the domain .
- Create a resource owner .
- Get a value .
- Get the token .
- Creates an identity provider from a response .
- Get default scopes .
oauth2-gitlab Key Features
oauth2-gitlab Examples and Code Snippets
Community Discussions
Trending Discussions on oauth2-gitlab
QUESTION
I am trying to do a login based on gitlab OAuth2.
So I've found this package which is based on league/oauth2-client and this package seems to undercover all my needs. I properly configured token on my gitlab and it logins me properly, but when I got a redirection after sign in I got invalid state, which is caused by missing $_SESSION['oauth2state']
So the workflow is like this:
Go to localhost:XXXX --> Be redirected to gitlab --> Sign in --> Redirect back to localhost:XXXX --> Get invalid state because missing variable in session
My code is based on snippet from that
My PHP script
...ANSWER
Answered 2020-Oct-13 at 08:39I would say the problem is you never create a session. That's the reason why $_SESSION
is null
.
So how i manage that is that i always create a session with
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install oauth2-gitlab
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page