-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into rominhalltari-sc-75722-react-native-sdk-ad…
…d-support-for-general
- Loading branch information
Showing
7 changed files
with
170 additions
and
6 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 |
---|---|---|
@@ -1,3 +1,16 @@ | ||
# (Thu Nov 16 2023) | ||
|
||
#### 🐛 Bug Fix | ||
|
||
- `@magic-ext/[email protected]`, `@magic-ext/[email protected]` | ||
- 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 | ||
|
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
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 |
---|---|---|
@@ -1,5 +1,67 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# 🔒 Magic OAuth Extension for React Native (Bare) | ||
|
||
[![<MagicLabs>](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. | ||
<p align="center"> | ||
<a href="https://github.com/magiclabs/magic-js/blob/master/packages/@magic-ext/oauth/LICENSE">License</a> · | ||
<a href="https://github.com/magiclabs/magic-js/blob/master/packages/@magic-ext/oauth/CHANGELOG.md">Changelog</a> · | ||
<a href="https://github.com/magiclabs/magic-js/blob/master/CONTRIBUTING.md">Contributing Guide</a> | ||
</p> | ||
|
||
## 📖 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 <> | ||
<SafeAreaProvider> | ||
{/* Render the Magic iframe! */} | ||
<magic.Relayer /> | ||
{...} | ||
</SafeAreaProvider> | ||
</> | ||
} | ||
|
||
// Somewhere else in your code... | ||
await magic.auth.loginWithEmailOTP({ email: '[email protected]' }); | ||
``` | ||
👉 Check out some of our [React Native Demo apps](https://github.com/magiclabs/react-native-demo) for inspiration! 👀 |
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 |
---|---|---|
@@ -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 <[email protected]> (https://magic.link/)", | ||
"license": "MIT", | ||
|
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
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 |
---|---|---|
@@ -1,5 +1,67 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# 🔒 Magic OAuth Extension for React Native (Expo) | ||
|
||
[![<MagicLabs>](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. | ||
<p align="center"> | ||
<a href="https://github.com/magiclabs/magic-js/blob/master/packages/@magic-ext/oauth/LICENSE">License</a> · | ||
<a href="https://github.com/magiclabs/magic-js/blob/master/packages/@magic-ext/oauth/CHANGELOG.md">Changelog</a> · | ||
<a href="https://github.com/magiclabs/magic-js/blob/master/CONTRIBUTING.md">Contributing Guide</a> | ||
</p> | ||
|
||
## 📖 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 <> | ||
<SafeAreaProvider> | ||
{/* Render the Magic iframe! */} | ||
<magic.Relayer /> | ||
{...} | ||
</SafeAreaProvider> | ||
</> | ||
} | ||
|
||
// Somewhere else in your code... | ||
await magic.auth.loginWithEmailOTP({ email: '[email protected]' }); | ||
``` | ||
👉 Check out some of our [React Native Demo apps](https://github.com/magiclabs/react-native-demo) for inspiration! 👀 |
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 |
---|---|---|
@@ -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 <[email protected]> (https://magic.link/)", | ||
"license": "MIT", | ||
|