-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add checker in order to start authentication when configured (#9)
In this commit was added the capability of run this server when the user doesn't configured the facebook oauth service and this should be acessible without anykind of authentication. NOTE: This should be used only in dev mode
- Loading branch information
Victor Fernandes
committed
Mar 15, 2020
1 parent
15541d8
commit d563207
Showing
3 changed files
with
24 additions
and
4 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
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,13 @@ | ||
function hasFacebookCredentials () { | ||
return process.env.FB_APP_ID !== undefined && | ||
process.env.FB_APP_SECRET !== undefined && | ||
process.env.FB_CALLBACK_URL !== undefined; | ||
} | ||
|
||
function hasAuthentication () { | ||
return hasFacebookCredentials(); | ||
} | ||
|
||
module.exports = { | ||
hasAuthentication | ||
}; |
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