Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/casdoor/casdoor-uniapp-example
Uniapp Example of Casdoor via casdoor-uniapp-sdk
https://github.com/casdoor/casdoor-uniapp-example
auth casdoor iam miniprogram mobile oauth sdk sso uni-app uniapp wechat
Last synced: about 2 months ago
JSON representation
Uniapp Example of Casdoor via casdoor-uniapp-sdk
- Host: GitHub
- URL: https://github.com/casdoor/casdoor-uniapp-example
- Owner: casdoor
- License: apache-2.0
- Created: 2022-05-14T03:18:19.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-04T11:35:03.000Z (over 1 year ago)
- Last Synced: 2024-02-22T12:37:51.024Z (11 months ago)
- Topics: auth, casdoor, iam, miniprogram, mobile, oauth, sdk, sso, uni-app, uniapp, wechat
- Language: JavaScript
- Homepage: https://github.com/casdoor/casdoor-uniapp-sdk
- Size: 407 KB
- Stars: 0
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Casdoor Uniapp SDK Example
## Quick Start
- download the code
```shell
git clone https://github.com/casdoor/casdoor-uniapp-example
cd casdoor-uniapp-example
```- install dependencies
```shell
yarn install
```- run
```shell
yarn serve
```After running, you will see the following two interface:
## Configure
Now open `./src/main.js` file and you can see the following code:
```js
import App from './App'
// #ifndef VUE3
import Vue from 'vue'
import Sdk from 'casdoor-uniapp-sdk'
Vue.config.productionTip = false
Vue.use(Sdk, {
serverUrl: "https://door.casdoor.com", //casdoor server url
clientId: "014ae4bd048734ca2dea",
organizationName: "casbin",
appName: "app-casnode",
redirectPath: "/callback",
})
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
```The meanings of some fields are explained as follows:
| Name (in order) | Must | Description |
|------------------|------|------------------------------------------------------------------------------------------------|
| serverUrl | Yes | your Casdoor server URL |
| clientId | Yes | the Client ID of your Casdoor application |
| appName | Yes | the name of your Casdoor application |
| organizationName | Yes | the name of the Casdoor organization connected with your Casdoor application |
| redirectPath | No | the path of the redirect URL for your Casdoor application, will be `/callback` if not provided |