forked from hashrocket/tilex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change use of whitelist to allowlist (hashrocket#721)
- Loading branch information
1 parent
ef78533
commit 4187b29
Showing
5 changed files
with
11 additions
and
11 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 |
---|---|---|
|
@@ -69,7 +69,7 @@ $ PORT=4444 mix phx.server | |
|
||
Authentication is managed by Ueberauth and Google. See the [ueberauth_google | ||
README][ueberauth_google] and [Google Oauth 2 docs][oauth_google] for | ||
instructions. To allow users from a domain and/or comma-separated whitelist, | ||
instructions. To allow users from a domain and/or comma-separated allowlist, | ||
set those configurations in your environment: | ||
|
||
```shell | ||
|
@@ -78,7 +78,7 @@ set those configurations in your environment: | |
export GOOGLE_CLIENT_ID="your-key.apps.googleusercontent.com" | ||
export GOOGLE_CLIENT_SECRET="yoursecret" | ||
export HOSTED_DOMAIN="your-domain.com" | ||
export GUEST_AUTHOR_WHITELIST="[email protected], [email protected]" | ||
export GUEST_AUTHOR_ALLOWLIST="[email protected], [email protected]" | ||
``` | ||
|
||
Once set, visit http:https://localhost:4000/admin and log in with an email address | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,8 +63,8 @@ defmodule Tilex.AuthControllerTest do | |
assert get_flash(conn, :info) == "oauth2 profile is missing a valid name" | ||
end | ||
|
||
test "GET /auth/google/callback with whitelisted email", %{conn: conn} do | ||
Application.put_env(:tilex, :guest_author_whitelist, "[email protected], [email protected]") | ||
test "GET /auth/google/callback with allowlisted email", %{conn: conn} do | ||
Application.put_env(:tilex, :guest_author_allowlist, "[email protected], [email protected]") | ||
|
||
ueberauth_auth = | ||
ueberauth_struct("[email protected]", "Archibald Douglas", "186823978541230597895") | ||
|