{"id":18321094,"url":"https://github.com/workos/react-native-expo-example-app","last_synced_at":"2025-04-05T22:32:16.572Z","repository":{"id":38325460,"uuid":"434731857","full_name":"workos/react-native-expo-example-app","owner":"workos","description":"React Native Expo Example Application powered by WorkOS SSO","archived":false,"fork":false,"pushed_at":"2023-07-20T17:37:54.000Z","size":5644,"stargazers_count":10,"open_issues_count":12,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T20:50:18.801Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/workos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-03T20:58:45.000Z","updated_at":"2025-03-19T23:23:42.000Z","dependencies_parsed_at":"2023-01-29T04:30:59.523Z","dependency_job_id":null,"html_url":"https://github.com/workos/react-native-expo-example-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Freact-native-expo-example-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Freact-native-expo-example-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Freact-native-expo-example-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Freact-native-expo-example-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/workos","download_url":"https://codeload.github.com/workos/react-native-expo-example-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411234,"owners_count":20934650,"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":[],"created_at":"2024-11-05T18:18:19.949Z","updated_at":"2025-04-05T22:32:16.085Z","avatar_url":"https://github.com/workos.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WorkOS React Native Expo Example App\n\nAn example React Native Expo application demonstrating to use the WorkOS API to authenticate users via SSO, pull directory user details with Directory Sync and recieve and parse Webhooks.\n\n## Prerequisites\n\nEnsure that you have [expo](https://docs.expo.dev/get-started/installation/) installed.\n\n```\nnpm install expo\n```\n\n## React Native Expo Project Setup / SSO Tab\n\n1. Clone the main repo and install dependencies for the app you'd like to use:\n    ```bash\n    # HTTPS\n    git clone https://github.com/workos-inc/react-native-expo-example-app.git\n    ```\n    or\n\n    ```bash\n    # SSH\n    git clone git@github.com:workos-inc/react-native-expo-example-app.git\n    ```\n\n2. Navigate into the cloned repo.\n   ```bash\n   $ cd react-native-expo-example-app\n   ```\n\n3. Install the dependencies.\n    ```bash\n    $ npm install\n    ```\n\n## Configure your environment\n\n4. Grab your API Key and Client ID from the WorkOS Dashboard. Create a `.env` file at the root of the project, and store these like so:\n    ```\n    WORKOS_API_KEY=sk_xxxxxxxxxxxxx\n    WORKOS_CLIENT_ID=project_xxxxxxxxxxxx\n    WORKOS_CONNECTION_ID=conn_xxxxxxxxxxxxxx\n    ```\n\n## SSO Setup with WorkOS\n\n5. Follow the [SSO authentication flow instructions](https://workos.com/docs/sso/guide/introduction) to create a new SSO Connection in your WorkOS dashboard. Add the Connection ID to the envionment variables as `WORKOS_CONNECTION_ID`, as shown in the previous step.\n\n6. Add the URL generated with `AuthSession.makeRedirectUri().toString();` as a Redirect URI in the Configuration section of the Dashboard. The URL should look something like this: `exp://123.4.5.6:78900`.\n\n## Testing the Integration\n\n7. Start the server. An Expo browser page should launch and you can begin to test the login flow on your mobile device or a simulator!\n\n```sh\nnpx expo start\n```\n\n## Directory Sync Tab\n\nAs long as you've added your API key to the environment variables as `WORKOS_API_KEY`, you should also be able to use the Directory Sync tab to get a look into all of your currently configured Directories.\n\nSimply click on \"Show Directories\" to get a list of your current, active Directories. You can then click into any directory to get a list of users, and click into any user to get their details.\n\n## Webhooks Tab\n\nIn order to test out webhook functionality, you'll need to start the server (while `npm start` is still running). To run the server, use:\n\n```\nnpm run server\n```\n\nThe server will run on `localhost://8080`.\n\nYou'll then want to start an `ngrok` session. [Ngrok](https://ngrok.com/) is a simple application that allows you to map a local endpoint to a public endpoint.\n\nThe application will run on http://localhost:8080. Ngrok will create a tunnel to the application so we can receive webhooks from WorkOS.\n\n```sh\nngrok http 8080\n```\n\nNext, log into the [WorkOS Dashboard](https://dashboard.workos.com/webhooks) and add a Webhook endpoint with the public ngrok URL with `/webhooks` appended.\n\nThe local application is listening for webhook requests at http://localhost:8080/webhooks\n\nIn order for the SDK to validate that WorkOS webhooks, locate the Webhook secret from the dashboard.\n\nThen populate the following environment variable in your `.env` file at the root of the project.\n\n```sh\nWORKOS_WEBHOOK_SECRET=your_webhook_secret\n```\n\nYou will now be able to see your webhooks in the UI of the Webhooks tab as they come in!\n\n## Need help?\n\nIf you get stuck and aren't able to resolve the issue by reading our [documentation](https://docs.workos.com/), API reference, or tutorials, you can reach out to us at support@workos.com and we'll lend a hand.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkos%2Freact-native-expo-example-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkos%2Freact-native-expo-example-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkos%2Freact-native-expo-example-app/lists"}