sample-oauth2-client icon indicating copy to clipboard operation
sample-oauth2-client copied to clipboard

Example seems not to work here with me

Open braendi opened this issue 5 years ago • 2 comments
trafficstars

Hi Aaron I just started to read your book "Oauth2 simplified", but now im struggling already with the first example with GitHub. When I point my browser to localhost:8000 I get the login page as expected. Click on "Log In" redirects me to GitHub-Login. Here's my first issue: in the console, I get a warning "Cross-Origin Read Blocking (CORB) blocked cross-origin response https://api.github.com/_private/browser/stats with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details". Though, it seems to work so far. After logging in, I'm being redirected back to localhost:8000/index.php, but still get the "Not logged in" Text. When I log the access token to the console, its empty. Where's the mistake? I work on Windows 10. Regards, Stefan

braendi avatar Feb 03 '20 06:02 braendi

I see the CORB error you're talking about, but that's appearing on GitHub's website, it's not from your code. It looks like GitHub needs to update something to account for that. This application doesn't do any of the logic in JavaScript, so there isn't really a place this app could be causing JavaScript errors.

As for being redirected back and not logged in, make sure your browser isn't blocking cookies, and make sure you start at http://localhost:8000/ and not http://127.0.0.1:8000 since the browser won't share cookies between those two different hostnames.

aaronpk avatar Feb 24 '20 15:02 aaronpk

i am also facing same issue , Trying to access array offset on value of type null in \github.php on line 68. for github.php

After logging in, I'm being redirected back to localhost:8000 .. in console i am seeing above message

but from restclient when i tied with similar request it is working.

parasuram-tanguturu avatar Sep 01 '20 18:09 parasuram-tanguturu