Created
January 23, 2015 10:43
-
-
Save sandrinodimattia/5a8dedee87059a687ccd to your computer and use it in GitHub Desktop.
Go to strategy if only one is available
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
... | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.js"></script> | |
<script src="//cdn.auth0.com/js/lock-6.10.min.js"></script> | |
<script> | |
... | |
var lock = new Auth0Lock('@@clientID@@', '@@auth0Domain@@', initializationOptions); | |
lock.once('ready', function () { | |
var strategies = $('#a0-lock .a0-notloggedin .a0-iconlist [data-strategy]'); | |
if (strategies && strategies.length === 1) | |
strategies.click(); | |
}); | |
... | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment