<script setup lang="ts">
import { YoungAuth } from '@bluesyoung/casdoor-auth';
/**
* 默认配置
*
const defaultConf: SdkConfig = {
serverUrl: 'https://door.casdoor.com',
clientId: '014ae4bd048734ca2dea',
organizationName: 'casbin',
appName: 'app-casnode',
redirectPath: window.location.pathname
};
*/
const auth = new YoungAuth();
await auth.init();
</script>
<template>
<button @click="openHandler">启动APP</button>
</template>
<!-- 国内推荐使用 jsdelivr -->
<script src="//cdn.jsdelivr.net/npm/@bluesyoung/casdoor-auth"></script>
<!-- or -->
<script src="//unpkg.com/@bluesyoung/casdoor-auth"></script>
<script>
const auth = new window.YoungCasdoorAuth(config);
auth.init();
</script>