Skip to content

Commit

Permalink
Merge branch 'master' into rominhalltari-sc-75722-react-native-sdk-ad…
Browse files Browse the repository at this point in the history
…d-support-for-general
  • Loading branch information
romin-halltari authored Nov 16, 2023
2 parents 6e5d0e6 + 6b43f4f commit 0089c61
Show file tree
Hide file tree
Showing 7 changed files with 170 additions and 6 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
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
Expand Down
14 changes: 14 additions & 0 deletions packages/@magic-ext/react-native-bare-oauth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
66 changes: 64 additions & 2 deletions packages/@magic-ext/react-native-bare-oauth/README.md
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! 👀
2 changes: 1 addition & 1 deletion packages/@magic-ext/react-native-bare-oauth/package.json
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",
Expand Down
13 changes: 13 additions & 0 deletions packages/@magic-ext/react-native-expo-oauth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
66 changes: 64 additions & 2 deletions packages/@magic-ext/react-native-expo-oauth/README.md
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! 👀
2 changes: 1 addition & 1 deletion packages/@magic-ext/react-native-expo-oauth/package.json
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",
Expand Down

0 comments on commit 0089c61

Please sign in to comment.