pedroetb / node-oauth2-server-mongo-example Goto Github PK
View Code? Open in Web Editor NEWWorking oauth2 server with mongodb storage and minimal configuration
License: MIT License
Working oauth2 server with mongodb storage and minimal configuration
License: MIT License
how to implement scopes like openid, offline_access, profile, email
Hello all, When I received a new token from the Refresh_token grant type I encountered "Invalid grant: refresh token is invalid". I stored tokens with AWS DynamoDB. In line of 135 in node-oauth2-server-mongo-example/model.js file is referred to as token.client.id is client.clientId. It's not working for me. I tried to store the client.id instead of client.clientId. It's working fine now. Thanks for the oauth2-server example.
how do you get the data to insert into mongo db ?
You can call the loadExampleData function at model.js in order to create these entries automatically.
I tried just calling that function and its not going in.
Password grant type is working great - i can generate a toke.
I need to use the client_credentials grant type. What code change needs to be made to use it ?
I tried your example,still error when use refresh_token type,got below error
curl http://localhost:3000/oauth/token \
> -d "grant_type=refresh_token" \
> -d "client_id=application" \
> -d "client_secret=secret" \
> -d "refresh_token=5de9099aa1925063d05b75c4cca4377c9f9982ea" \
> -H "Authorization: Basic YXBwbGljYXRpb246c2VjcmV0" \
> -H "Content-Type: application/x-www-form-urlencoded"
{"statusCode":400,"status":400,"code":400,"message":"Unauthorized client: `grant_type` is invalid","name":"unauthorized_client"}
I am trying to work out how to create a provider that connects this to Next-Auth JS.
this is the information that they provide.
https://next-auth.js.org/configuration/providers/oauth#authorization-option
However the issue is that this code has no
authorization: {
url: "https://example.com/oauth/authorization", // WHERE DO I POINT THIS TOO?
params: { scope: "email" }
}
Can this be used if you use Mongodb atlas?
what needs to be modified to use HTTPS instead of HTTP ? is this possible for Oauth2-Server
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.