First of all, congrats ๐ฏ ๐ ๐ , this is a very cool project!
I've been trying to set-up a Next app that talks to the Github API and I found the beta of this library by far the nicest and simpler to configure โจ
I did give a try to Next Auth0, but it seems by far too complicated for my use-case ( and got lost trying to configure stuff in the Auth0 dashboard ๐ )
I managed to get an app working that connects to Github:
https://github.com/lluia/hip-hub
Taking next-auth-example as a base but modifying it to use Typescript:

I also requested more scopes to be able to query the Github API, which is my next step.
Assuming the access token stored in the session is what Github give us back, I'm trying to CURL the API with it as per the docs but I get the following error:
$ curl -H "Authorization: bearer [token]" -X POST -d " \
{ \
\"query\": \"query { viewer { login }}\" \
} \
" https://api.github.com/graphql
{
"message": "Bad credentials",
"documentation_url": "https://developer.github.com/v4"
}
In theory, it should work ๐ ๐คท๐ปโโ๏ธ , appreciate any help with this ๐๐ป
The tokens are stored in the Accounts table. This also has been discussed here.
@iaincollins maybe I can add this to the OAuth section of the providers docs?
Thanks, this should do for now ๐ฏ
I think having it in the docs woulb be useful ๐๐ป
Thanks for sharing @lluia ! I'm glad it's working out and appreciate the feedback and the question.
@LoriKarikari I think your right! Sounds like it's worth us documenting some example code for now as it seems like a common question
Most helpful comment
Thanks, this should do for now ๐ฏ
I think having it in the docs woulb be useful ๐๐ป