-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add organization authentication (#55)
* Add organization authentication * Add organization authentication * Add new dotenv files * Fix gCloud deployment * Separate dev and prod keys
- Loading branch information
Showing
14 changed files
with
218 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Rename this file to .env.[dev|prod] | ||
# When making changes to any .env file: | ||
# Update .env.[dev|prod] | ||
# Update values from Team Drive | ||
# Update values in cloudbuild.yaml and clouddeploy.yaml | ||
# Update values to gCloud build triggers | ||
|
||
PASSPORT_CLIENT_ID= | ||
PASSPORT_CLIENT_SECRET= | ||
BASE_URL= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
var passport = require('passport'); | ||
const GoogleStrategy = require('passport-google-oauth20').Strategy; | ||
|
||
passport.use(new GoogleStrategy({ | ||
clientID: process.env.PASSPORT_CLIENT_ID, | ||
clientSecret: process.env.PASSPORT_CLIENT_SECRET, | ||
callbackURL: process.env.BASE_URL + "auth/google/callback" | ||
}, | ||
(accessToken, refreshToken, profile, cb) => cb(null, profile) | ||
)); | ||
|
||
passport.serializeUser((user, done) => done(null, user)); | ||
|
||
passport.deserializeUser((user, done) => done(null, user)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.