manjeshpv / node-oauth2-server-implementation

Using oauth2-server: 3.0.0-b2 & Supports MongoDB, MySQL, PostgreSQL, MSSQL & SQLite
216 stars 103 forks source link

How to get access token on new version #30

Open noprobz09 opened 6 years ago

noprobz09 commented 6 years ago

Hi all,

I am beginner here. How can I get access token on new version? I was using the old one and below is the sample code to get the token.

app.all('/oauth/token', app.oauth.grant());

app.get('/', app.oauth.authorise(), function (req, res) {
    res.send('Congratulations, you are in a secret area!');
});

Thanks in advance.