Skip to content

Commit 2cf6e0d

Browse files
committed
2 parents a37764c + b9de4a9 commit 2cf6e0d

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@ A RedwoodJS plugin that adds OAuth capabilities to projects using dbAuth.
44
[![API side NPM version](https://img.shields.io/npm/v/%40spoonjoy%2Fredwoodjs-dbauth-oauth-api?logo=redwoodjs&label=npm%20-%20api%20side)](https://www.npmjs.com/package/@spoonjoy/redwoodjs-dbauth-oauth-api)
55
[![Web side NPM version](https://img.shields.io/npm/v/%40spoonjoy%2Fredwoodjs-dbauth-oauth-web?logo=redwoodjs&label=npm%20-%20web%20side)](https://www.npmjs.com/package/@spoonjoy/redwoodjs-dbauth-oauth-web)
66

7+
### This is currently in production at [spoonjoy.app](https://spoonjoy.app), check it out!
8+
79
## Overview
8-
This plugin provides an easy and effective way to integrate OAuth into your RedwoodJS applications, offering a seamless experience for both developers and end users. Currently, it supports OAuth providers including Apple, GitHub, and Google, with a flexible architecture that allows for the expansion to more providers.
10+
This library provides an easy and effective way to integrate OAuth into your [RedwoodJS](https://redwoodjs.com/) applications, offering a seamless experience for both developers and end users. Currently, it supports OAuth providers including Apple, GitHub, and Google, with a flexible architecture that allows for the expansion to more providers.
11+
12+
This library additionally provides buttons to make setup even more effortless:
13+
14+
![button screenshots](https://github.com/spoonjoy/redwoodjs-dbauth-oauth/assets/16390116/ad13882e-3153-49df-bb06-5ffd30e04389)
15+
916

1017
## Project Structure
1118
The project follows the dbAuth integration pattern as of Redwood version 4 and aligns with the Decoupled Auth strategy. It is structured as a Yarn monorepo with two main packages: `web` and `api`.

api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ If you haven't already added the packages to your `web` and `api` workspaces, we
2626
First, we need to add the model for storing the linked OAuth provider information in the database. Go ahead and paste this wherever you like in `api/db/schema.prisma`:
2727
```prisma
2828
model OAuth {
29-
provider string
29+
provider String
3030
// The ID of the user on the OAuth provider's system
3131
providerUserId String
3232
// The username of the user on the OAuth provider's system. Useful for helping users identify their linked accounts

web/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ const onOAuthError = (error: string) => {
4848
toast.error(error)
4949
}
5050

51+
const oAuthClient = createOAuthClient({
52+
enabledProviders: { apple: false, github: false, google: false },
53+
})
54+
5155
export const { OAuthProvider, useOAuth } = createOAuth(
5256
oAuthClient,
5357
onOAuthError

0 commit comments

Comments
 (0)