ต่อ auth keycloak
This commit is contained in:
parent
04be324441
commit
aecfb85e14
2 changed files with 27 additions and 9 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* front connect to keycloak
|
||||
*/
|
||||
import Keycloak from "keycloak-js";
|
||||
import Keycloak from 'keycloak-js'
|
||||
// import config from "../app.config";
|
||||
// import http from "../shared/http";
|
||||
// import router from "../router";
|
||||
|
|
@ -10,14 +10,14 @@ const initOptions = {
|
|||
// url: "https://keycloak.frappet.synology.me/auth/",
|
||||
// realm: "bma-ehr",
|
||||
// clientId: "bma-ehr-vue3",
|
||||
url: "https://identity.frappet.com/",
|
||||
realm: "bma-ehr",
|
||||
clientId: "bma-ehr-vue3",
|
||||
}; //option keycloak ที่จะ connect
|
||||
url: 'https://identity.frappet.com/',
|
||||
realm: 'exam_test',
|
||||
clientId: 'exam_vue3'
|
||||
} //option keycloak ที่จะ connect
|
||||
|
||||
const keycloak = Keycloak(initOptions);
|
||||
const keycloak = Keycloak(initOptions)
|
||||
|
||||
keycloak.onAuthSuccess = () => {}; //เพิ่มlogin สำเร็จจะมาทำฟังก์ชันนี้
|
||||
keycloak.onAuthSuccess = () => {} //เพิ่มlogin สำเร็จจะมาทำฟังก์ชันนี้
|
||||
|
||||
await keycloak.init({ checkLoginIframe: false }); //ทำการ connect keycloak
|
||||
export default keycloak;
|
||||
await keycloak.init({ checkLoginIframe: false }) //ทำการ connect keycloak
|
||||
export default keycloak
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue