Skip to content
프로젝트

funador/react-auth-client

GitHub에서 보기

소개

Social authentication with React and Node

보안 및 개인정보 보호

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
+1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

React Social Authentication Client

React Social Auth

Client half of a decoupled OAuth setup for React: clicking a provider button opens a popup to the server, which does the actual OAuth dance and pushes the authenticated profile back here over a socket. Written in TypeScript.

Demo

Live demo

Medium posts that detail this repo

Getting Started

git clone https://github.com/funador/react-auth-client.git
cd react-auth-client
npm i && HTTPS=true npm start

Because of Facebook, HTTPS is required locally

Facebook requires every app talking to its API — including apps in development — to be served over HTTPS.

macOS

To add HTTPS to localhost, follow these instructions, then manually trust the cert in Chrome as described here.

You may also need to open a separate tab for https://localhost:8080 and accept the security warning before the client will push requests through.

Windows

Thanks to Le Gui PPF for these SSL-on-Windows instructions:

I spent a whole day figuring out how to generate a proper SSL certificate with all Chrome's requirements — see this answer and add the following to the v3 req section:

authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment

If you only want Twitter/Google/Github authentication (no HTTPS hassle), use the twitter-auth branch instead.

Server

This client just talks to a socket + a few OAuth routes — there's no client-side provider setup. Follow the instructions in the server repo to register each provider and get the server running.

Once the server's reachable, open https://localhost:3000.

Deploy

Deployed on Vercel, pointed at the deployed server via API_URL in src/config.ts.

Issues

Something not working? Please open an issue or submit a PR.

관련 프로젝트 살펴보기

불러오는 중…