-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #295 from auth0/dev
Release 3.2.18
- Loading branch information
Showing
6 changed files
with
45 additions
and
45 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
<script id="auth0" src="<?php echo $cdn ?>"></script> | ||
<script type="text/javascript"> | ||
document.addEventListener("DOMContentLoaded", function() { | ||
if (typeof(ignore_sso) !== 'undefined' && ignore_sso) { | ||
return; | ||
} | ||
if (typeof(Auth0Lock) === 'undefined') { | ||
return; | ||
if (typeof(auth0) === 'undefined') { | ||
return; | ||
} | ||
|
||
var auth0 = new Auth0({ | ||
var webAuth = new auth0.WebAuth({ | ||
clientID:'<?php echo $client_id; ?>', | ||
domain:'<?php echo $domain; ?>' | ||
}); | ||
auth0.getSSOData(function(err, data) { | ||
if (!err && data.sso) { | ||
auth0.signin(<?php echo json_encode( $lock_options->get_sso_options() ); ?>); | ||
} | ||
|
||
webAuth.client.getSSOData(function(err, data) { | ||
if (!err && data.sso) { | ||
webAuth.authorize(<?php echo json_encode( $lock_options->get_sso_options() ); ?>); | ||
} | ||
}); | ||
}); | ||
</script> |