Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
Added additional https localhost on whitelist for debuging and allow …
Browse files Browse the repository at this point in the history
…signin to use postMessage() to communicate token
  • Loading branch information
mishaelnuh committed Sep 8, 2019
1 parent 64d2d8c commit f607870
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .env-base
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ GITHUB_CALLBACK="CHANGE_ME"

# Whitelisted domains
# Add here any other places that you trust this server to redirect to once authentication is done.
REDIRECT_URLS="http://localhost:5050,https://app.speckle.systems"
REDIRECT_URLS="http://localhost:5050,https://localhost:8080,https://app.speckle.systems"

# Wether to allow non http*s* redirect urls.
# "localhost" redirect urls will always work with or without TLS.
Expand Down
4 changes: 3 additions & 1 deletion views/postLogin.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
}
if( redirectUrl && redirectUrl !== '') {
if( window.opener ) {
if( window.parent && window.parent !== window ) {
window.parent.postMessage("{{connectionString}}", "{{redirectUrl}}")
} else if( window.opener ) {
window.opener.location.href = "{{redirectUrl}}?token={{connectionString}}"
self.close()
} else {
Expand Down

0 comments on commit f607870

Please sign in to comment.