Skip to content

cwp0/casdoor-unity-example

 
 

Repository files navigation

casdoor-unity-example

The example uses the Casdoor demo site server and Casdoor.Client SDK for .NET in casdoor-dotnet-sdk.

The game in this example is based on ValleyOfCubes_Unity3D.

Quick Start

  • download the code
 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
iOS-gif Android-gif

Login with the casdoor web page

iOS Android
iOS-gif Android-gif

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
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 = "<your client id>",
    ClientSecret = "<your client secret>",
});

License

This project is licensed under the Apache 2.0 license.

About

Unity 3D Mobile games app example for Casdoor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • ShaderLab 58.0%
  • C# 21.2%
  • Mathematica 10.9%
  • HLSL 9.9%