UNPKG

passport-annict

Version:

Passport strategy for authenticating with Annict using the OAuth 2.0 API.

29 lines (28 loc) 866 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class Profile { static create({ data: { viewer } }) { return { provider: 'annict', id: viewer.annictId, displayName: viewer.name, username: viewer.username, preferredUsername: viewer.username, emails: [{ value: viewer.email }], photos: [{ value: viewer.avatarUrl }], accounts: [ { domain: 'annict.com', userid: viewer.annictId, username: viewer.username, }, { domain: 'annict.jp', userid: viewer.annictId, username: viewer.username, }, ], }; } } exports.Profile = Profile;