import GithubAuth from 'node-user-accounts-boilerplate/node-user-accounts-boilerplate-nahid/auth/GithubAuth.js'
GithubAuth
Extends:
OAuth login using githuhb login provider
Requires passport-github2
package.
Constructor Summary
Public Constructor | ||
public |
constructor(options: object) |
Member Summary
Public Members | ||
public |
OAuth 2 Client ID |
|
public |
OAuth 2 Client Secret |
|
public |
proxy: * Should it construct urls based on proxy headers. |
Method Summary
Public Methods | ||
public |
install(app: *, prefix: *, passport: *) |
Inherited Summary
From class Auth | ||
public |
Additional settings given to passport.authenticate. |
|
public |
Custom fields |
|
public |
Default error message to return instead of actual errors (security). |
|
public |
Default roles new registered users should assume. |
|
public |
description: * This is a standard descriptor of this authentication mechanism that is publicly shared. |
|
public |
method: * Authentication method name. |
|
public |
users: CachedCollection Users collection. |
|
public |
async createProfileFromCredential(id: *, extra: {}): * helper method that creates a profile object from a credential address |
|
public |
createUserFromProfile(profile: Profile): User Helper method that creates an User object from a Profile |
|
public |
Helper method that finds an user based on a credential. |
|
public |
generateId(): * |
|
public |
handleUserLoginByProfile(username: string, profile: Profile, done: Function, req: Request) Helper method for SSO type logins. |
|
public abstract |
Must be overridden to provide implementation of said authentication method. |
|
public |
Helper method that produces a middleware to handle successful logged in case. |
Public Constructors
public constructor(options: object) source
Override:
Auth#constructorParams:
Name | Type | Attribute | Description |
options | object | see Auth class + additional options for email configuration. |
Public Members
Public Methods
public install(app: *, prefix: *, passport: *) source
Must be overridden to provide implementation of said authentication method.
Override:
Auth#installParams:
Name | Type | Attribute | Description |
app | * | ||
prefix | * | ||
passport | * |