Skip to content

Commit ca39312

Browse files
RNAA Docusaurus v1 site (#981)
Co-authored-by: Charlie Brown <carbonrobot@gmail.com>
1 parent 3ea0060 commit ca39312

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+9670
-61
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Example
1+
Example
2+
docs/docusaurus.config.ts

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<a href="https://formidable.com/open-source/" target="_blank">
2-
<img alt="React Native App Auth — Formidable, We build the modern web" src="https://raw.githubusercontent.com/FormidableLabs/react-native-app-auth/main/react-native-app-auth-Hero.png" />
2+
<img alt="React Native App Auth — Formidable, We build the modern web" src="https://oss.nearform.com/api/banner?text=react+native+app+auth" />
33
</a>
44
<p align="center">
55
<strong>React native bridge for AppAuth - an SDK for communicating with OAuth2 providers</strong>
@@ -124,7 +124,7 @@ with optional overrides.
124124
- **registrationEndpoint** - (`string`) fully formed url to your OAuth/OpenID Connect registration endpoint. Only necessary for servers that require client registration.
125125
- **endSessionEndpoint** - (`string`) fully formed url to your OpenID Connect end session endpoint. If you want to be able to end a user's session and no `issuer` is specified, this field is mandatory.
126126
- **clientId** - (`string`) _REQUIRED_ your client id on the auth server
127-
- **clientSecret** - (`string`) client secret to pass to token exchange requests. :warning: Read more about [client secrets](#note-about-client-secrets)
127+
- **clientSecret** - (`string`) client secret to pass to token exchange requests. :warning: Read more about [client secrets](/docs/client-secrets)
128128
- **redirectUrl** - (`string`) _REQUIRED_ the url that links back to your app with the auth code
129129
- **scopes** - (`array<string>`) the scopes for your token, e.g. `['email', 'offline_access']`.
130130
- **additionalParameters** - (`object`) additional parameters that will be passed in the authorization request.
@@ -548,6 +548,6 @@ Please see our [contributing guide](./.github/CONTRIBUTING.md).
548548
549549
## Maintenance Status
550550
551-
**Active:** Formidable is actively working on this project, and we expect to continue for work for the foreseeable future. Bug reports, feature requests and pull requests are welcome.
551+
**Active:** Nearform is actively working on this project, and we expect to continue for work for the foreseeable future. Bug reports, feature requests and pull requests are welcome.
552552
553553
[maintenance-image]: https://img.shields.io/badge/maintenance-active-green.svg

docs/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docs/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
This site is deployed using Vercel, which will automatically detect the site config and deploy

docs/babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

docs/docs/client-secrets.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
# Client Secrets
6+
7+
Some authentication providers, including examples cited below, require you to provide a client secret. The authors of the AppAuth library
8+
9+
> [strongly recommend](https://github.com/openid/AppAuth-Android#utilizing-client-secrets-dangerous) you avoid using static client secrets in your native applications whenever possible. Client secrets derived via a dynamic client registration are safe to use, but static client secrets can be easily extracted from your apps and allow others to impersonate your app and steal user data. If client secrets must be used by the OAuth2 provider you are integrating with, we strongly recommend performing the code exchange step on your backend, where the client secret can be kept hidden.
10+
11+
Having said this, in some cases using client secrets is unavoidable. In these cases, a `clientSecret` parameter can be provided to `authorize`/`refresh` calls when performing a token request.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"label": "Config Examples",
3+
"position": 3,
4+
"link": {
5+
"type": "generated-index"
6+
}
7+
}

docs/config-examples/asgardeo.md renamed to docs/docs/config-examples/asgardeo.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Asgardeo
2+
13
To add authentication to your app using Asgardeo, you will first need to [create an application](https://wso2.com/asgardeo/docs/guides/applications/register-mobile-app/) in the Asgardeo console. If you don't have an Asgardeo account, [you can signup for one free](https://asgardeo.io/signup).
24

35
After creating an application, take note of the configuration values listed in the **Quick Start** and **Info** tabs. You will be using those values as follows.
@@ -7,7 +9,7 @@ export const config = {
79
issuer: 'https://api.asgardeo.io/t/<your_org_name>/oauth2/token',
810
clientId: '<your_application_id>',
911
redirectUrl: '<your_appAuthRedirectScheme>://example',
10-
scopes: ['openid', 'profile']
12+
scopes: ['openid', 'profile'],
1113
};
1214

1315
// Log in to get an authentication token
@@ -20,12 +22,12 @@ const refreshedState = await refresh(config, {
2022

2123
// Revoke token
2224
await revoke(config, {
23-
tokenToRevoke: refreshedState.refreshToken
25+
tokenToRevoke: refreshedState.refreshToken,
2426
});
2527

2628
// End session
2729
await logout(config, {
2830
idToken: authState.idToken,
29-
postLogoutRedirectUrl: '<your_appAuthRedirectScheme>:/logout'
31+
postLogoutRedirectUrl: '<your_appAuthRedirectScheme>:/logout',
3032
});
3133
```

docs/config-examples/aws-cognito.md renamed to docs/docs/config-examples/aws-cognito.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ const config = {
1818
serviceConfiguration: {
1919
authorizationEndpoint: '<YOUR_DOMAIN_NAME>/oauth2/authorize',
2020
tokenEndpoint: '<YOUR_DOMAIN_NAME>/oauth2/token',
21-
revocationEndpoint: '<YOUR_DOMAIN_NAME>/oauth2/revoke'
22-
}
21+
revocationEndpoint: '<YOUR_DOMAIN_NAME>/oauth2/revoke',
22+
},
2323
};
2424

2525
// Log in to get an authentication token
@@ -32,6 +32,6 @@ const refreshedState = await refresh(config, {
3232

3333
// Revoke token
3434
await revoke(config, {
35-
tokenToRevoke: refreshedState.refreshToken
35+
tokenToRevoke: refreshedState.refreshToken,
3636
});
3737
```

docs/config-examples/azure-active-directory-b2c.md renamed to docs/docs/config-examples/azure-active-directory-b2c.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Azure Active Directory B2C
1+
# Azure Active Directory B2C
22

33
Detailed documentation [here](https://docs.microsoft.com/en-us/azure/active-directory-b2c/openid-connect).
44

@@ -7,7 +7,7 @@ const config = {
77
issuer: 'https://<TENANT_NAME>.b2clogin.com/<TENANT_NAME>.onmicrosoft.com/<USER_FLOW_NAME>/v2.0',
88
clientId: '<APPLICATION_ID>',
99
redirectUrl: 'com.myapp://redirect/url/', // the redirectUrl must end with a slash
10-
scopes: ['openid', 'offline_access']
10+
scopes: ['openid', 'offline_access'],
1111
};
1212

1313
// Log in to get an authentication token

0 commit comments

Comments
 (0)