diff --git a/CHANGELOG.md b/CHANGELOG.md index d6cd38e94..047fe9187 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +# (Thu Nov 16 2023) + +#### ๐Ÿ› Bug Fix + +- `@magic-ext/react-native-bare-oauth@17.0.2`, `@magic-ext/react-native-expo-oauth@17.0.2` + - Add README for `react-native-bare-oauth` and `react-native-expo-oauth` [#666](https://github.com/magiclabs/magic-js/pull/666) ([@romin-halltari](https://github.com/romin-halltari)) + +#### Authors: 1 + +- [@romin-halltari](https://github.com/romin-halltari) + +--- + # (Tue Nov 14 2023) #### ๐Ÿ› Bug Fix diff --git a/packages/@magic-ext/react-native-bare-oauth/CHANGELOG.md b/packages/@magic-ext/react-native-bare-oauth/CHANGELOG.md index 1f5b611c8..319175b60 100644 --- a/packages/@magic-ext/react-native-bare-oauth/CHANGELOG.md +++ b/packages/@magic-ext/react-native-bare-oauth/CHANGELOG.md @@ -1,3 +1,17 @@ +# v17.0.2 (Thu Nov 16 2023) + +#### ๐Ÿ› Bug Fix + +- Add README for `react-native-bare-oauth` and `react-native-expo-oauth` [#666](https://github.com/magiclabs/magic-js/pull/666) ([@romin-halltari](https://github.com/romin-halltari)) +- Fix incorrect lib import on readme ([@romin-halltari](https://github.com/romin-halltari)) +- Add README for react-native-bare-oauth and react-native-expo-oauth ([@romin-halltari](https://github.com/romin-halltari)) + +#### Authors: 1 + +- [@romin-halltari](https://github.com/romin-halltari) + +--- + # v17.0.1 (Tue Nov 14 2023) #### ๐Ÿ› Bug Fix diff --git a/packages/@magic-ext/react-native-bare-oauth/README.md b/packages/@magic-ext/react-native-bare-oauth/README.md index 3fc8593b5..cd48eb1b4 100644 --- a/packages/@magic-ext/react-native-bare-oauth/README.md +++ b/packages/@magic-ext/react-native-bare-oauth/README.md @@ -1,5 +1,67 @@ - - + + +# ๐Ÿ”’ Magic OAuth Extension for React Native (Bare) + +[![](https://circleci.com/gh/magiclabs/magic-js.svg?style=shield)](https://circleci.com/gh/magiclabs/magic-js) + +> With the Magic JavaScript SDK OAuth extension, you can plug into your favorite social login providers with one, easy-to-use API. + +

+ License ยท + Changelog ยท + Contributing Guide +

+ +## ๐Ÿ“– Documentation + +See the [developer documentation](https://magic.link/docs/social-login) to learn how to get started with OAuth in Magic SDK. + +## ๐Ÿ”— Installation + +Integrating your app with OAuth will require our client-side NPM package and OAuth extension: + +```bash +# Via NPM: +npm install --save @magic-ext/react-native-bare-oauth + +# Via Yarn: +yarn add @magic-ext/react-native-bare-oauth +``` +### โš ๏ธ This library can only be used on a bare react native project that uses [@magic-sdk/react-native-bare](https://github.com/magiclabs/magic-js/tree/master/packages/%40magic-sdk/react-native-bare). + +## โšก๏ธ Quick Start + +Sign up or log in to the [developer dashboard](https://dashboard.magic.link ) to receive API keys that will allow your application to interact with Magic's authentication APIs. + +Then, you can start authenticating users with _just one method!_ + +```tsx +import React from 'react'; +import { Magic } from '@magic-sdk/react-native-bare'; +import { OAuthExtension } from "@magic-ext/react-native-bare-oauth"; +import { SafeAreaProvider } from 'react-native-safe-area-context'; + +const magic = new Magic(apiKey, { + endpoint: 'https://box.magic.link', + extensions: [ + new OAuthExtension() + ], +}); + +export default function App() { + return <> + + {/* Render the Magic iframe! */} + + {...} + + +} + +// Somewhere else in your code... +await magic.auth.loginWithEmailOTP({ email: 'your.email@example.com' }); +``` +โ โ ๐Ÿ‘‰ Check out some of our [React Native Demo apps](https://github.com/magiclabs/react-native-demo) for inspiration! ๐Ÿ‘€ diff --git a/packages/@magic-ext/react-native-bare-oauth/package.json b/packages/@magic-ext/react-native-bare-oauth/package.json index d02d39e16..c4bedcfd7 100644 --- a/packages/@magic-ext/react-native-bare-oauth/package.json +++ b/packages/@magic-ext/react-native-bare-oauth/package.json @@ -1,6 +1,6 @@ { "name": "@magic-ext/react-native-bare-oauth", - "version": "17.0.1", + "version": "17.0.2", "description": "Magic SDK OAuth Extension for Bare React Native environments.", "author": "Magic (https://magic.link/)", "license": "MIT", diff --git a/packages/@magic-ext/react-native-expo-oauth/CHANGELOG.md b/packages/@magic-ext/react-native-expo-oauth/CHANGELOG.md index 35f365fad..e8e08e233 100644 --- a/packages/@magic-ext/react-native-expo-oauth/CHANGELOG.md +++ b/packages/@magic-ext/react-native-expo-oauth/CHANGELOG.md @@ -1,3 +1,16 @@ +# v17.0.2 (Thu Nov 16 2023) + +#### ๐Ÿ› Bug Fix + +- Add README for `react-native-bare-oauth` and `react-native-expo-oauth` [#666](https://github.com/magiclabs/magic-js/pull/666) ([@romin-halltari](https://github.com/romin-halltari)) +- Add README for react-native-bare-oauth and react-native-expo-oauth ([@romin-halltari](https://github.com/romin-halltari)) + +#### Authors: 1 + +- [@romin-halltari](https://github.com/romin-halltari) + +--- + # v17.0.1 (Tue Nov 14 2023) #### ๐Ÿ› Bug Fix diff --git a/packages/@magic-ext/react-native-expo-oauth/README.md b/packages/@magic-ext/react-native-expo-oauth/README.md index bcf9173c4..d6c7e778d 100644 --- a/packages/@magic-ext/react-native-expo-oauth/README.md +++ b/packages/@magic-ext/react-native-expo-oauth/README.md @@ -1,5 +1,67 @@ - - + + +# ๐Ÿ”’ Magic OAuth Extension for React Native (Expo) + +[![](https://circleci.com/gh/magiclabs/magic-js.svg?style=shield)](https://circleci.com/gh/magiclabs/magic-js) + +> With the Magic JavaScript SDK OAuth extension, you can plug into your favorite social login providers with one, easy-to-use API. + +

+ License ยท + Changelog ยท + Contributing Guide +

+ +## ๐Ÿ“– Documentation + +See the [developer documentation](https://magic.link/docs/social-login) to learn how to get started with OAuth in Magic SDK. + +## ๐Ÿ”— Installation + +Integrating your app with OAuth will require our client-side NPM package and OAuth extension: + +```bash +# Via NPM: +npm install --save @magic-ext/react-native-expo-oauth + +# Via Yarn: +yarn add @magic-ext/react-native-expo-oauth +``` +### โš ๏ธ This library can only be used on an Expo project that uses [@magic-sdk/react-native-expo](https://github.com/magiclabs/magic-js/tree/master/packages/%40magic-sdk/react-native-expo). + +## โšก๏ธ Quick Start + +Sign up or log in to the [developer dashboard](https://dashboard.magic.link ) to receive API keys that will allow your application to interact with Magic's authentication APIs. + +Then, you can start authenticating users with _just one method!_ + +```tsx +import React from 'react'; +import { Magic } from '@magic-sdk/react-native-expo'; +import { OAuthExtension } from "@magic-ext/react-native-expo-oauth"; +import { SafeAreaProvider } from 'react-native-safe-area-context'; + +const magic = new Magic(apiKey, { + endpoint: 'https://box.magic.link', + extensions: [ + new OAuthExtension() + ], +}); + +export default function App() { + return <> + + {/* Render the Magic iframe! */} + + {...} + + +} + +// Somewhere else in your code... +await magic.auth.loginWithEmailOTP({ email: 'your.email@example.com' }); +``` +โ โ ๐Ÿ‘‰ Check out some of our [React Native Demo apps](https://github.com/magiclabs/react-native-demo) for inspiration! ๐Ÿ‘€ diff --git a/packages/@magic-ext/react-native-expo-oauth/package.json b/packages/@magic-ext/react-native-expo-oauth/package.json index 13c11b30d..394728b2d 100644 --- a/packages/@magic-ext/react-native-expo-oauth/package.json +++ b/packages/@magic-ext/react-native-expo-oauth/package.json @@ -1,6 +1,6 @@ { "name": "@magic-ext/react-native-expo-oauth", - "version": "17.0.1", + "version": "17.0.2", "description": "Magic SDK OAuth Extension for Expo React Native environments.", "author": "Magic (https://magic.link/)", "license": "MIT",