https://github.com/casdoor/casdoor-raw-js-example
Casdoor example for vanilla HTML + JS +CSS websites
https://github.com/casdoor/casdoor-raw-js-example
auth casbin casdoor css example html js oauth oidc sdk sso vanilla
Last synced: 7 months ago
JSON representation
Casdoor example for vanilla HTML + JS +CSS websites
- Host: GitHub
- URL: https://github.com/casdoor/casdoor-raw-js-example
- Owner: casdoor
- License: apache-2.0
- Created: 2022-05-18T15:16:25.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-24T08:13:21.000Z (almost 2 years ago)
- Last Synced: 2025-03-24T13:11:12.316Z (7 months ago)
- Topics: auth, casbin, casdoor, css, example, html, js, oauth, oidc, sdk, sso, vanilla
- Language: HTML
- Homepage: https://github.com/casdoor/casdoor-js-sdk
- Size: 244 KB
- Stars: 3
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# casdoor-raw-js-example
---
This is an example on how to use `casdoor-js-sdk` without framework. We will show you the steps below.
## What you need prepare
The Casdoor should be deployed.
You can refer to the Casdoor official documentation for the [install guide](https://casdoor.org/docs/basic/server-installation) . Deploy the casdoor instance in **production mode**.
After a successful deployment, you need to ensure:
- Open your favorite browser and visit http://localhost:8000 , you can see the login page of Casdoor.
- Input `admin` and `123` to test login functionality is working fine## Start
### get this example
``` shell
# by ssh
git clone git@github.com:casdoor/casdoor-raw-js-example.git
# by https
git clone https://github.com/casdoor/casdoor-spring-boot-example.git
```### use it
```shell
# enter the example in your file directory
cd casdoor-raw-js-example
# enter the src directory and install the package
cd src
npm install
# run the server
npm start
```If there is no problem in above steps , you can see the terminal console : ` server listen at http://localhost:5000`
You can press `Ctrl+C` and click this link , or input it to your browser.
Finally, it runs in your browser look like below gif represented.
