-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: andrei-zgirvaci <[email protected]>
- Loading branch information
1 parent
6a1d355
commit 4539962
Showing
37 changed files
with
1,301 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. | ||
|
||
API docs are generated automatically using [docusaurus-plugin-typedoc](https://www.npmjs.com/package/docusaurus-plugin-typedoc). Typedoc entrypoints are loaded from [`entrypoints.json`](./entrypoints.json) via [`docusaurus.config.ts`](docusaurus.config.ts) and corresponding Markdown outputs are emitted to [`/docs/docs/api`](./docs/api). The [`/docs/docs/contributing.mdx`](/docs/docs/contributing.mdx) file is a wrapper that imports & renders root project's [`CONTRIBUTING.md`](/CONTRIBUTING.md) file to reduce redundancy. This `contributing.mdx` file - apart from functioning standalone - is processed by `typedoc-plugin-replace-text` to replace `CONTRIBUTING.md`'s relative links with Docusaurus docs files tree links. | ||
|
||
### Installation | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
### Build | ||
|
||
``` | ||
$ yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
Using SSH: | ||
|
||
``` | ||
$ USE_SSH=true yarn deploy | ||
``` | ||
|
||
Not using SSH: | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> yarn deploy | ||
``` | ||
|
||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
label: "API" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
label: "Classes" | ||
position: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
--- | ||
id: "core_src.AuthModule" | ||
title: "Class: AuthModule<C>" | ||
sidebar_label: "AuthModule" | ||
custom_edit_url: null | ||
--- | ||
|
||
[core/src](../modules/core_src.md).AuthModule | ||
|
||
## Type parameters | ||
|
||
| Name | Type | | ||
| :------ | :------ | | ||
| `C` | [`BaseAuthConfig`](../modules/core_src.md#baseauthconfig) | | ||
|
||
## Constructors | ||
|
||
### constructor | ||
|
||
• **new AuthModule**\<`C`\>(`moduleName`): [`AuthModule`](core_src.AuthModule.md)\<`C`\> | ||
|
||
#### Type parameters | ||
|
||
| Name | Type | | ||
| :------ | :------ | | ||
| `C` | [`BaseAuthConfig`](../modules/core_src.md#baseauthconfig) | | ||
|
||
#### Parameters | ||
|
||
| Name | Type | | ||
| :------ | :------ | | ||
| `moduleName` | `string` | | ||
|
||
#### Returns | ||
|
||
[`AuthModule`](core_src.AuthModule.md)\<`C`\> | ||
|
||
#### Defined in | ||
|
||
[core/src/AuthModule.ts:8](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L8) | ||
|
||
## Properties | ||
|
||
### authNativeModule | ||
|
||
• **authNativeModule**: `any` | ||
|
||
#### Defined in | ||
|
||
[core/src/AuthModule.ts:6](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L6) | ||
|
||
## Methods | ||
|
||
### getAccessToken | ||
|
||
▸ **getAccessToken**(): `Promise`\<`string`\> | ||
|
||
#### Returns | ||
|
||
`Promise`\<`string`\> | ||
|
||
#### Defined in | ||
|
||
[core/src/AuthModule.ts:26](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L26) | ||
|
||
___ | ||
|
||
### getUser | ||
|
||
▸ **getUser**(): `Promise`\<[`OmhUserProfile`](../modules/core_src.md#omhuserprofile)\> | ||
|
||
#### Returns | ||
|
||
`Promise`\<[`OmhUserProfile`](../modules/core_src.md#omhuserprofile)\> | ||
|
||
#### Defined in | ||
|
||
[core/src/AuthModule.ts:30](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L30) | ||
|
||
___ | ||
|
||
### initialize | ||
|
||
▸ **initialize**(`config`): `Promise`\<`void`\> | ||
|
||
#### Parameters | ||
|
||
| Name | Type | | ||
| :------ | :------ | | ||
| `config` | `C` | | ||
|
||
#### Returns | ||
|
||
`Promise`\<`void`\> | ||
|
||
#### Defined in | ||
|
||
[core/src/AuthModule.ts:18](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L18) | ||
|
||
___ | ||
|
||
### refreshAccessToken | ||
|
||
▸ **refreshAccessToken**(): `Promise`\<`string`\> | ||
|
||
#### Returns | ||
|
||
`Promise`\<`string`\> | ||
|
||
#### Defined in | ||
|
||
[core/src/AuthModule.ts:34](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L34) | ||
|
||
___ | ||
|
||
### revokeAccessToken | ||
|
||
▸ **revokeAccessToken**(): `Promise`\<`void`\> | ||
|
||
#### Returns | ||
|
||
`Promise`\<`void`\> | ||
|
||
#### Defined in | ||
|
||
[core/src/AuthModule.ts:38](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L38) | ||
|
||
___ | ||
|
||
### signIn | ||
|
||
▸ **signIn**(): `Promise`\<`void`\> | ||
|
||
#### Returns | ||
|
||
`Promise`\<`void`\> | ||
|
||
#### Defined in | ||
|
||
[core/src/AuthModule.ts:22](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L22) | ||
|
||
___ | ||
|
||
### signOut | ||
|
||
▸ **signOut**(): `Promise`\<`void`\> | ||
|
||
#### Returns | ||
|
||
`Promise`\<`void`\> | ||
|
||
#### Defined in | ||
|
||
[core/src/AuthModule.ts:42](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/AuthModule.ts#L42) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
id: "index" | ||
title: "react-native-omh-auth" | ||
sidebar_label: "Readme" | ||
sidebar_position: 0 | ||
custom_edit_url: null | ||
--- | ||
|
||
# React Native OMH Auth | ||
|
||
React Native OMH Auth Core package | ||
|
||
## Installation | ||
|
||
```bash | ||
npm install --save @omh/react-native-auth-core | ||
npm install --save @omh/react-native-auth-plugin-... | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
import {GoogleAuth} from '@omh/react-native-auth-google'; | ||
|
||
await GoogleAuth.initialize(['openid', 'email', 'profile']); | ||
|
||
await googleAuthProvider.signIn(); | ||
``` | ||
|
||
## Contributing | ||
|
||
See the [contributing guide](../contributing.mdx) to learn how to contribute to the repository and the development workflow. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
id: "modules" | ||
title: "react-native-omh-auth" | ||
sidebar_label: "Table of Contents" | ||
sidebar_position: 0.5 | ||
hide_table_of_contents: true | ||
custom_edit_url: null | ||
--- | ||
|
||
## Modules | ||
|
||
- [core/src](modules/core_src.md) | ||
- [plugin-dropbox/src](modules/plugin_dropbox_src.md) | ||
- [plugin-facebook/src](modules/plugin_facebook_src.md) | ||
- [plugin-google/src](modules/plugin_google_src.md) | ||
- [plugin-microsoft/src](modules/plugin_microsoft_src.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
label: "Modules" | ||
position: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
id: "core_src" | ||
title: "Module: core/src" | ||
sidebar_label: "core/src" | ||
sidebar_position: 0 | ||
custom_edit_url: null | ||
--- | ||
|
||
## Classes | ||
|
||
- [AuthModule](../classes/core_src.AuthModule.md) | ||
|
||
## Type Aliases | ||
|
||
### BaseAuthConfig | ||
|
||
Ƭ **BaseAuthConfig**: `Object` | ||
|
||
#### Type declaration | ||
|
||
| Name | Type | | ||
| :------ | :------ | | ||
| `scopes` | `string`[] | | ||
|
||
#### Defined in | ||
|
||
[core/src/types.ts:1](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/types.ts#L1) | ||
|
||
___ | ||
|
||
### OmhUserProfile | ||
|
||
Ƭ **OmhUserProfile**: `Object` | ||
|
||
#### Type declaration | ||
|
||
| Name | Type | | ||
| :------ | :------ | | ||
| `email?` | `string` | | ||
| `name?` | `string` | | ||
| `profileImage?` | `string` | | ||
| `surname?` | `string` | | ||
|
||
#### Defined in | ||
|
||
[core/src/types.ts:5](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/core/src/types.ts#L5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
id: "plugin_dropbox_src" | ||
title: "Module: plugin-dropbox/src" | ||
sidebar_label: "plugin-dropbox/src" | ||
sidebar_position: 0 | ||
custom_edit_url: null | ||
--- | ||
|
||
## Variables | ||
|
||
### default | ||
|
||
• `Const` **default**: [`AuthModule`](../classes/core_src.AuthModule.md)\<[`BaseAuthConfig`](core_src.md#baseauthconfig)\> | ||
|
||
#### Defined in | ||
|
||
[plugin-dropbox/src/index.tsx:4](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/plugin-dropbox/src/index.tsx#L4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
id: "plugin_facebook_src" | ||
title: "Module: plugin-facebook/src" | ||
sidebar_label: "plugin-facebook/src" | ||
sidebar_position: 0 | ||
custom_edit_url: null | ||
--- | ||
|
||
## Variables | ||
|
||
### default | ||
|
||
• `Const` **default**: [`AuthModule`](../classes/core_src.AuthModule.md)\<[`BaseAuthConfig`](core_src.md#baseauthconfig)\> | ||
|
||
#### Defined in | ||
|
||
[plugin-facebook/src/index.tsx:4](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/plugin-facebook/src/index.tsx#L4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
id: "plugin_google_src" | ||
title: "Module: plugin-google/src" | ||
sidebar_label: "plugin-google/src" | ||
sidebar_position: 0 | ||
custom_edit_url: null | ||
--- | ||
|
||
## Variables | ||
|
||
### default | ||
|
||
• `Const` **default**: [`AuthModule`](../classes/core_src.AuthModule.md)\<[`BaseAuthConfig`](core_src.md#baseauthconfig)\> | ||
|
||
#### Defined in | ||
|
||
[plugin-google/src/index.tsx:4](https://github.com/openmobilehub/rn-omh-auth/blob/b43af64eae277675f57051591f993f84fd70cd48/packages/plugin-google/src/index.tsx#L4) |
Oops, something went wrong.