MCPcopy Create free account
hub / github.com/NirmalScaria/firebase-nextjs / createAuthClient

Function createAuthClient

scripts/a_setupGcloud.mjs:56–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54}
55
56async function createAuthClient() {
57 const redirectUri = 'http://localhost:8085/';
58
59 const oauth2Client = new google.auth.OAuth2(oauthDetails.clientId, oauthDetails.clientSecret, redirectUri);
60
61 const scopes = [
62 'openid',
63 'https://www.googleapis.com/auth/cloud-platform',
64 'https://www.googleapis.com/auth/userinfo.email',
65 ];
66
67 const authUrl = oauth2Client.generateAuthUrl({
68 access_type: 'offline',
69 scope: scopes
70 });
71
72 return { authUrl, oauth2Client };
73}

Callers 1

googleAuthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected