Skip to content

Commit

Permalink
default redirect for unset state
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed Oct 16, 2018
1 parent 8aea3d7 commit 86ea622
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions login.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ <h1>Redirecting...</h1>
<script>
// config vars, TODO move to something more configurable
var redirect_uri = "https://wolf.cci.emory.edu/camic_uat/login.html"
var default_redirect = "https://wolf.cci.emory.edu/camic_uat/viewer.html"
var audience = "wolf.cci.emory.edu/camic_uat"
var scope = "openid%20email"
var client_id = "YLRDUmEs5Jivi6FX3XtNNAt97X3a0epD"
Expand Down Expand Up @@ -41,6 +42,9 @@ <h1>Redirecting...</h1>
// get variables
let id_token = getUrlParam("id_token")
let state = getUrlParam("state")
if (!state){
state = default_redirect
}
// is this a login pre or post?
if (id_token){
document.cookie = cookie_name +"=" + id_token;
Expand Down

0 comments on commit 86ea622

Please sign in to comment.