{"id":20215560,"url":"https://github.com/casdoor/casdoor-go-react-example","last_synced_at":"2025-07-23T11:39:06.992Z","repository":{"id":196409266,"uuid":"683589982","full_name":"casdoor/casdoor-go-react-example","owner":"casdoor","description":"Go + React example app for Casdoor based on casdoor-go-sdk, casdoor-js-sdk and casdoor-react-sdk","archived":false,"fork":false,"pushed_at":"2024-09-14T13:51:57.000Z","size":495,"stargazers_count":10,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T14:57:41.674Z","etag":null,"topics":["casdoor","go","iam","javascript","js","mux","oauth","oidc","react","sdk","sso"],"latest_commit_sha":null,"homepage":"https://github.com/casdoor/casdoor-go-sdk","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/casdoor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-27T04:14:09.000Z","updated_at":"2025-02-17T23:25:43.000Z","dependencies_parsed_at":"2024-06-21T14:11:01.521Z","dependency_job_id":"88d76c3b-f99a-44cb-a67f-5315b4c2d6d5","html_url":"https://github.com/casdoor/casdoor-go-react-example","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.0714285714285714,"last_synced_commit":"0153f1cf63fc527cf736edff05f9788f11efce8c"},"previous_names":["casdoor/casdoor-go-react-sdk-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/casdoor/casdoor-go-react-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casdoor%2Fcasdoor-go-react-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casdoor%2Fcasdoor-go-react-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casdoor%2Fcasdoor-go-react-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casdoor%2Fcasdoor-go-react-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/casdoor","download_url":"https://codeload.github.com/casdoor/casdoor-go-react-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casdoor%2Fcasdoor-go-react-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266671044,"owners_count":23966096,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["casdoor","go","iam","javascript","js","mux","oauth","oidc","react","sdk","sso"],"created_at":"2024-11-14T06:23:20.932Z","updated_at":"2025-07-23T11:39:06.958Z","avatar_url":"https://github.com/casdoor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\" style=\"border-bottom: none;\"\u003e📦⚡️Casdoor React + Go example\u003c/h1\u003e\n\u003ch3 align=\"center\"\u003eAn example of casdoor-react-sdk and casdoor-go-sdk\u003c/h3\u003e\n\n## Architecture\n\nExample contains 2 parts:\n\n| Name     | SDK               | Language           | Source code                                  |\n|----------|-------------------|--------------------|----------------------------------------------|\n| Frontend | casdoor-react-sdk | Javascript + React | https://github.com/casdoor/casdoor-react-sdk |\n| Backend  | casdoor-go-sdk    | Go                 | https://github.com/casdoor/casdoor-go-sdk    |\n\n### Demo videos\n\n1. login:\n\n![normalLogin](./login.gif)\n\n\n## Installation\n\nExample uses Casdoor to manage members. So you need to create an organization and an application for the example in a Casdoor instance. For how to install Casdoor, see: https://casdoor.org/docs/basic/server-installation\n\n### Get the code\n\n```shell\ngit clone https://github.com/casdoor/casdoor-go-react-example\n```\n\n## Configuration\n\n### Frontend\n\nModify `web/src/Conf.js`: https://github.com/casdoor/casdoor-go-react-example/blob/master/web/src/Conf.js\n\n```js\nexport const sdkConfig = {\n  serverUrl: \"https://door.casdoor.com\",\n  clientId: \"294b09fbc17f95daf2fe\",\n  organizationName: \"casbin\",\n  appName: \"app-vue-python-example\",\n  redirectPath: \"/callback\",\n};\n```\n\n### Backend\n\nModify `app.yaml`: https://github.com/casdoor/casdoor-go-react-example/blob/master/app.yaml\n\n```yaml\n# certificate:get in your Casdoor server -\u003e identity -\u003e Certs -\u003e application cert\ncertificate: |\n  -----BEGIN CERTIFICATE-----\n  MIIE+TCCAuGgAwIBAgIDAeJAMA0GCSqGSIb3DQEBCwUAMDYxHTAbBgNVBAoTFENh\n  c2Rvb3IgT3JnYW5pemF0aW9uMRUwEwYDVQQDEwxDYXNkb29yIENlcnQwHhcNMjEx\n  MDE1MDgxMTUyWhcNNDExMDE1MDgxMTUyWjA2MR0wGwYDVQQKExRDYXNkb29yIE9y\n  Z2FuaXphdGlvbjEVMBMGA1UEAxMMQ2FzZG9vciBDZXJ0MIICIjANBgkqhkiG9w0B\n  AQEFAAOCAg8AMIICCgKCAgEAsInpb5E1/ym0f1RfSDSSE8IR7y+lw+RJjI74e5ej\n  rq4b8zMYk7HeHCyZr/hmNEwEVXnhXu1P0mBeQ5ypp/QGo8vgEmjAETNmzkI1NjOQ\n  CjCYwUrasO/f/MnI1C0j13vx6mV1kHZjSrKsMhYY1vaxTEP3+VB8Hjg3MHFWrb07\n  uvFMCJe5W8+0rKErZCKTR8+9VB3jane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z5P9NJNA7KoO5AVMp9w0DQTkt+LbXnZE\n  HHnWKy8xHQKZF9sR7YBPGLs/Ac6tviv5Ua15OgJ/8dLRZ/veyFfGo2yZsI+hKVU5\n  nCCJHBcAyFnm1hdvdwEdH33jDBjNB6ciotJZrf/3VYaIWSalADosHAgMWfXuWP+h\n  8XKXmzlxuHbTMQYtZPDgspS5aK+S4Q9wb8RRAYo=\n  -----END CERTIFICATE-----\nserver:\n  endpoint: \"https://door.casdoor.com\" # Casdoor server endpoint\n  client_id: \"294b09fbc17f95daf2fe\" # Application client id\n  client_secret: \"dd8982f7046ccba1bbd7851d5c1ece4e52bf039d\" # Application client secret\n  organization: \"casbin\" # Name of the organization that the application belongs to\n  application: \"app-vue-python-example\" # Name of the application\n  frontend_url: \"http://localhost:3000\" # Frontend URL\n```\n\n- Install frontend dependencies\n\n```shell\ncd web\nyarn install\n```\n\n- run\n\nFrontend:\n\n```shell\ncd web\nyarn start\n```\n\nBackend:\n\n```shell\ngo run .\n```\n\n- Now, example runs its front end at port 3000 and runs it's back end at port 8080. You can modify the code and see what will happen.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasdoor%2Fcasdoor-go-react-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcasdoor%2Fcasdoor-go-react-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasdoor%2Fcasdoor-go-react-example/lists"}