Giter Site home page Giter Site logo

casdoor / casdoor-uniapp-example Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 3.0 417 KB

Uniapp Example of Casdoor via casdoor-uniapp-sdk

Home Page: https://github.com/casdoor/casdoor-uniapp-sdk

License: Apache License 2.0

JavaScript 33.90% HTML 11.75% Vue 31.50% SCSS 22.85%
auth casdoor iam oauth sso uni-app uniapp miniprogram mobile sdk wechat

casdoor-uniapp-example's Introduction

Casdoor Uniapp SDK Example

Quick Start

  • download the code
git clone https://github.com/casdoor/casdoor-uniapp-example
cd casdoor-uniapp-example
  • install dependencies
yarn install
  • run
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:

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

casdoor-uniapp-example's People

Contributors

beacontownfc avatar hsluoyz avatar selflocking avatar

Watchers

 avatar  avatar  avatar

casdoor-uniapp-example's Issues

uniapp报错该应用不支持Grant_type:

官方提供的demo跑不通,提示:该应用不支持Grant_type:
image

说明:
1,无论是用官方的后端地址和app还是用我自行部署的,都不行。
2,其他的SDK是可以正常登录的,比如后台的PHP的SDK。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.