Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/casdoor/casdoor-unity-example
Unity 3D Mobile games app example for Casdoor
https://github.com/casdoor/casdoor-unity-example
android casdoor desktop dotnet game iam ios mobile oauth oauth2 oidc sso unity unity3d
Last synced: about 16 hours ago
JSON representation
Unity 3D Mobile games app example for Casdoor
- Host: GitHub
- URL: https://github.com/casdoor/casdoor-unity-example
- Owner: casdoor
- License: apache-2.0
- Created: 2023-07-28T05:18:43.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-08-20T03:19:10.000Z (about 1 year ago)
- Last Synced: 2024-02-22T12:37:49.684Z (9 months ago)
- Topics: android, casdoor, desktop, dotnet, game, iam, ios, mobile, oauth, oauth2, oidc, sso, unity, unity3d
- Language: ShaderLab
- Homepage: https://github.com/casdoor/casdoor-dotnet-sdk
- Size: 16 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# casdoor-unity-example
The example uses the [Casdoor demo site](https://door.casdoor.com/) server and [`Casdoor.Client`](https://github.com/casdoor/casdoor-dotnet-sdk/tree/master/src/Casdoor.Client) SDK for `.NET` in [casdoor-dotnet-sdk](https://github.com/casdoor/casdoor-dotnet-sdk/).
The game in this example is based on [ValleyOfCubes_Unity3D](https://github.com/oussamabonnor1/ValleyOfCubes_Unity3D).
## Quick Start
- download the code
```bash
git clone [email protected]:casdoor/casdoor-unity-example.git
```- Open the newly downloaded code in `Unity Hub` and run it.
## After running, you will see the following interfaces:
### Login with username and password
| **iOS** | **Android** |
| :---------------------------------------------------------: | :----------------------------------------------------------: |
| | |### Login with the casdoor web page
| **iOS** | **Android** |
| :----------------------------------------------------------: | :----------------------------------------------------------: |
| | |## Configure
Initialization requires 6 parameters, which are all str type:
| Name (in order) | Must | Description |
| ---------------- | ---- | ------------------------------------------------------ |
| Endpoint | Yes | Casdoor Server Url, such as `https://door.casdoor.com` |
| OrganizationName | Yes | Organization name |
| ApplicationName | Yes | Application name |
| ApplicationType | Yes | webapp, webapi or native |
| ClientId | Yes | Your client id |
| ClientSecret | Yes | Your client secret |```C#
var httpClient = new HttpClient();
var client = new CasdoorClient(HttpClient, new CasdoorOptions{
Endpoint = "https://door.casdoor.com",
OrganizationName = "build-in",
ApplicationName = "app-build-in",
ApplicationType = "native", // webapp, webapi or native
ClientId = "",
ClientSecret = "",
});
```## License
This project is licensed under the [Apache 2.0 license](https://github.com/casdoor/casdoor-dotnet-sdk/blob/master/LICENSE).