Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Steem Connect</title>
- <script src="//cdn.steemjs.com/lib/latest/steemconnect.min.js"></script>
- </head>
- <body>
- <script>
- steemconnect.init({
- app: 'krnel',
- callbackURL: 'http://localhost/'
- });
- var isAuth = false;
- var loginURL = steemconnect.getLoginURL();
- steemconnect.isAuthenticated(function(err, result) {
- if (!err && result.isAuthenticated) {
- isAuth = true;
- var username = result.username;
- //do more
- console.log("logged in user: " + username);
- }
- });
- function redirect() {
- window.location = loginURL;
- }
- </script>
- <a href="#" onClick="redirect()">Log In</a>
- <a href="https://steemconnect.com/logout">Log Out</a>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement