{"id":16017503,"url":"https://github.com/madarche/oidc-rp-native-example","last_synced_at":"2025-04-05T03:23:36.633Z","repository":{"id":75078575,"uuid":"293347048","full_name":"madarche/oidc-rp-native-example","owner":"madarche","description":"OpenID Connect Relying Party (RP) native client (like a mobile app) example","archived":false,"fork":false,"pushed_at":"2021-12-17T14:23:06.000Z","size":198,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T20:06:18.689Z","etag":null,"topics":["oidc","openid","openid-client","openid-connect"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/madarche.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":"2020-09-06T19:23:17.000Z","updated_at":"2021-12-17T14:23:09.000Z","dependencies_parsed_at":"2024-02-06T06:45:39.218Z","dependency_job_id":null,"html_url":"https://github.com/madarche/oidc-rp-native-example","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"3c38a1ecca65470390247a0d0ca0f6cf2460a254"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madarche%2Foidc-rp-native-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madarche%2Foidc-rp-native-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madarche%2Foidc-rp-native-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madarche%2Foidc-rp-native-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madarche","download_url":"https://codeload.github.com/madarche/oidc-rp-native-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247281972,"owners_count":20913273,"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","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":["oidc","openid","openid-client","openid-connect"],"created_at":"2024-10-08T16:06:28.012Z","updated_at":"2025-04-05T03:23:36.615Z","avatar_url":"https://github.com/madarche.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"oidc-rp-native-example\n======================\n\n[![Build Status](https://travis-ci.org/madarche/oidc-rp-native-example.svg?branch=master)](https://travis-ci.org/madarche/oidc-rp-native-example)\n\nOpenID Connect Relying Party (RP) *native client* (like a mobile app) example\n\n:warning: Native clients specifics: While this project is a demo of a *native\nclient* it is implemented as a web application. It's not an error. This is done\non purpose to ease its installation and usage, but its  settings are those of a\n*native client*.\n\n\nArchitecture\n------------\n\nThis example needs an OIDC Server (OP) and optionally an OAuth2 Resource Server\n(https://github.com/madarche/oauth2-resource-server-example).\n\n![Architecture schema](architecture.png \"Architecture schema\")\n\n\nUsage\n-----\n\nIt is assumed that this application will run as\nhttps://oidc-rp-native-example.local.test/. One can change this URL with whatever\nother URL.\n\nFirst, write the `config.tom` config file.\n\nOptionally set the `resources.url` property with the URL of the OAuth2 Resource Server route.\n\n```shellsession\ncp config.toml.example config.toml\nvim config.toml\n```\n\nNext, register the RP in the OP with the following properties:\n\n* `client_id` : the same as the `client_id` set in the `config.toml`\n* `redirect_uris` : `https://oidc-rp-native-example.local.test/logged_in`\n* `post_logout_redirect_uris` : `https://oidc-rp-native-example.local.test/logged_out`\n\nNative clients specifics: No client_secret\n\n* `application_type` : `native`\n* `token_endpoint_auth_method` : `none`\n\nThen, install the needed packages and start the application:\n\n```shellsession\nnpm ci\nnpm start\n```\n\nFinally, visit the application at https://oidc-rp-native-example.local.test/\n\n\n### When the OP uses self-signed certificate\n\nIf the OP uses a self-signed certificate, one gets the following error:\n```\nRequestError: self signed certificate\n```\n\nThe solution is, prior to the  `npm start` command, to specify the certificate\nto Node.js, for example:\n\n```shellsession\nexport NODE_EXTRA_CA_CERTS=/etc/nginx/ssl/cert/local.test.crt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadarche%2Foidc-rp-native-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadarche%2Foidc-rp-native-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadarche%2Foidc-rp-native-example/lists"}