0.0.58 • Published 5 years ago

oautha v0.0.58

Weekly downloads
57
License
-
Repository
-
Last release
5 years ago

Readme for OAA, a new way to setup O-Authentication.

All of the websites that matter are supported fully. Simply call oautha as middleware and let it handle the rest.

Here is an Express server example:

1. Setup a button to send a get request to '/githublogin'

2. Run oautha.githubLogin(clientID, scopes) - see the docs for specific inputs needed for each individual o-auth process.

    2a. This will send your user right to the official github login page where they can login.
    2b. Once they're done they will be sent back to the redirect url that you gave to github.

3. In your middleware for the redirect url you can then use oautha.githubToken(clientId, clientSecret, userAgent)

    3a. If you check your console you will see that res.locals.githubData now contains the data you asked for
    3b. Feel free to do whatever you want with it after.

Code:

app.get('/githublogin', githubController.githubLogin(CLIENT_ID, ['user', 'public_repo']), (req, res, next) => {
    console.log('github oauth running');
});
0.0.58

5 years ago

0.0.57

5 years ago

0.0.56

5 years ago

0.0.55

5 years ago

0.0.54

5 years ago

0.0.53

5 years ago

0.0.52

5 years ago

0.0.51

5 years ago

0.0.5

5 years ago

0.0.41

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago