MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / buildAuthMeta

Function buildAuthMeta

src/modules/gmail.js:344–361  ·  view source on GitHub ↗
(token)

Source from the content-addressed store, hash-verified

342}
343
344function buildAuthMeta(token) {
345 const data = {
346 access_token: token.access_token,
347 access_token_exp: new Date().getTime() + token.expires_in * 1000,
348 scope: token.scope
349 };
350 if (token.refresh_token) {
351 data.refresh_token = token.refresh_token;
352 }
353 if (token.hd) {
354 data.gsuite = token.hd;
355 data.gmail_account_id = token.sub;
356 if (token.legacyGsuite) {
357 data.legacyGsuite = token.legacyGsuite;
358 }
359 }
360 return data;
361}
362
363function buildLicenseData(valid) {
364 const data = {

Callers 2

getAccessTokenFunction · 0.85
authorizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected