Remove usage of deprecated Promise.success()/error() in example (#15179)

References:
- 0362d3a430
- 650f3a8367/adapters/oidc/js/dist/keycloak.d.ts (L283-L297)

Co-authored-by: Stian Thorgersen <stianst@gmail.com>
This commit is contained in:
Bumsik Kim 2023-07-26 15:33:00 +09:00 committed by GitHub
parent 2267352b9e
commit 88b0e48e63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,9 +53,9 @@
<script>
function loadProfile() {
keycloak.loadUserProfile().success(function(profile) {
keycloak.loadUserProfile().then(function(profile) {
output(profile);
}).error(function() {
}).catch(function() {
output('Failed to load profile');
});
}
@ -82,9 +82,9 @@
}
function loadUserInfo() {
keycloak.loadUserInfo().success(function(userInfo) {
keycloak.loadUserInfo().then(function(userInfo) {
output(userInfo);
}).error(function() {
}).catch(function() {
output('Failed to load user info');
});
}
@ -167,7 +167,7 @@
}
};
// Flow can be changed to 'implicit' or 'hybrid', but then client must enable implicit flow in admin console too
// Flow can be changed to 'implicit' or 'hybrid', but then client must enable implicit flow in admin console too
var initOptions = {
responseMode: 'fragment',
flow: 'standard'