Skip to content

Instantly share code, notes, and snippets.

View nriesco's full-sized avatar

Nico R. nriesco

  • Santiago, Chile
View GitHub Profile
const { AuthenticationService, JWTStrategy } = require('@feathersjs/authentication');
const { LocalStrategy } = require('@feathersjs/authentication-local');
const { expressOauth, OAuthStrategy } = require('@feathersjs/authentication-oauth');
class GoogleStrategy extends OAuthStrategy {
// https://github.com/feathersjs/feathers/blob/be91206e3dba1e65a81412b7aa636bece3ab4aa2/packages/authentication-oauth/src/strategy.ts#L113-L119
async createEntity(profile, params) {
// check if the user exists and has access
if (youShouldLetHimIn) {