0.9.0 • Published 4 years ago

hapi-oauth v0.9.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Hapi oauth

Usage

import * as HapiOAuth from 'hapi-oauth';

// ...

class ApiOAuthHandler extends HapiOAuth.OAuthHandler {
    public onLink(res: LinkSuccess, request: Request, reply: IReply): void {
        // Do your stuff
    }
}

server.register({
    register: HapiOAuth,
    options: {
        handler: new ApiOAuthHandler(),
        baseUrl: 'http://localhost:8080',
        requestConfig: {
            // Change request config values here, e.g. adding optional auth (for linking existing accounts for example)
            auth: { mode: 'optional', strategy: 'jwt' }
        },
        providers: [
            new HapiOAuth.MixerProvider(
                'mixerClientId',
                'mixerClientSecret',
                ['user:details:self' /* add more scopes here */]
            ),
            // Rinse and repeat for other providers.
        ]
    }
});
0.9.0

4 years ago

0.8.1

6 years ago

0.8.0

6 years ago

0.7.0

6 years ago

0.6.0

6 years ago

0.5.3

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago