Skip to content

Commit e6b1ede

Browse files
author
Carl Philipp Sporon
committed
Update Login.md
1 parent 4373533 commit e6b1ede

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Frontend/Login.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ It suppports 3 cases
2626
}
2727
```
2828

29-
### JavaScript
29+
### JavaScript
3030
```javascript
3131
chayns.ready.then(function () {
3232
checkForLogin();
@@ -43,7 +43,12 @@ function checkForLogin() {
4343
}
4444

4545
function login() {
46+
//optional -> prevents site reload
47+
chayns.setAccessTokenChange(true, (envData) function {
48+
console.log('login successful');
49+
});
50+
4651
//reloads tapp after login
4752
chayns.login(['login=true']);
4853
}
49-
```
54+
```

0 commit comments

Comments
 (0)