Skip to content

Commit

Permalink
fix: #2023 tweaks to go live with NPM (#2244)
Browse files Browse the repository at this point in the history
* fix: tweaks to go live with NPM

* fix: fixed defintions
  • Loading branch information
willmcvay authored Jul 31, 2020
1 parent 30b14b5 commit 8afc7ab
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions packages/cognito-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

![lines](/packages/cognito-auth/src/tests/badges/badge-lines.svg) ![functions](/packages/cognito-auth/src/tests/badges/badge-functions.svg) ![branches](/packages/cognito-auth/src/tests/badges/badge-branches.svg) ![statements](/packages/cognito-auth/src/tests/badges/badge-statements.svg)

A thin wrapper around the AWS SDK and OAuth flow to take the pain out of authenticating your App with Reapit Connect. Usage see: [here](https://foundations-documentation.reapit.cloud/open-source/packages#cognito-auth).
A thin wrapper around the AWS SDK and OAuth flow to take the pain out of authenticating your App with Reapit Connect.

## DEPRECATED
## DEPRECATED - Please use https://www.npmjs.com/package/@reapit/connect-session

We will continue to offer patches and bugfixes for this package however, we strongly suggest that you migrate to `@reapit/connect-session` for a lighter weight solution when working with Reapit Connect; a more comprehensive, simpler API and better developer experience.
We will continue to offer patches and bugfixes for this package however, we strongly suggest that you migrate to `@reapit/connect-session` for a light-weight solution when working with Reapit Connect; a more comprehensive, simpler API and better developer experience.

2 changes: 1 addition & 1 deletion packages/cognito-auth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reapit/cognito-auth",
"version": "2.1.11",
"version": "3.0.0",
"description": "Simple wrapper around AWS Cognito for basic authentication flow",
"keywords": [],
"homepage": "https://github.com/reapit/foundations#readme",
Expand Down
12 changes: 8 additions & 4 deletions packages/connect-session/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

![lines](/packages/connect-session/src/tests/badges/badge-lines.svg) ![functions](/packages/connect-session/src/tests/badges/badge-functions.svg) ![branches](/packages/connect-session/src/tests/badges/badge-branches.svg) ![statements](/packages/connect-session/src/tests/badges/badge-statements.svg)

A thin wrapper around the Reapit Connect (AWS Congnito) OAuth API. Takes the pain away from managing refreshing sessions and re-directing to the OAuth endpoints. [here](https://foundations-documentation.reapit.cloud/api/web#connect-session) and [here](https://foundations-documentation.reapit.cloud/open-source/packages#connect-session).
A thin wrapper around the Reapit Connect OAuth API.

- **Production**: https://www.npmjs.com/package/@reapit/connect-session
Managing OAuth flows can be tricky, especially redirecting, keeping sessions refreshed and cached. To make this process easier, we have built the Connect Session module for any JavaScript app.

To get started run `yarn add @reapit/connect-session`

Then follow the steps for either browsers, React or NodeJS below. For full documentaion [here](https://foundations-documentation.reapit.cloud/app-development/connect-session).

## Basic Browser Usage

Expand All @@ -24,7 +28,7 @@ export const reapitConnectBrowserSession = new ReapitConnectBrowserSession({
// The url to the Reapit Connect instance. While in beta this is the below URL but will need to be context aware in full prod/
connectOAuthUrl: 'https://dev.connect.reapit.cloud',
// The relative path you want to re-direct in your application after a successful login. You will have supplied this when you registered your app.
// Defaults to '' or the route of your project if not supplied
// Defaults to '' or the root of your project if not supplied
connectLoginRedirectPath: '/some-redirect-path',
// The relative path you want to re-direct in your application after a successful logout. You will have supplied this when you registered your app.
// Defaults to '/login' if not supplied
Expand Down Expand Up @@ -126,7 +130,7 @@ export const SomeComponent: React.FC = () => {

## Sign In With Reapit Button

Perhaps the simplest way to authenticate on the client side is to embed the "Sign In With Reapit Button" on your page. This is a single script served from our CDN, you instantiate with a target div, your client credentials as per the browser API and pass in a callback to receive your session object. As per the NPM module, all caching, redirection and refreshing is taken care of by the package. When you have a session, the button will change function to be a logout which will clear your cache and end yourr session in Reapit Connect.
Perhaps the simplest way to authenticate on the client side is to embed the "Sign In With Reapit Button" on your page. This is a single script served from our CDN, you instantiate with a target div, your client credentials as per the browser API and pass in a callback to receive your session object. As per the NPM module, all caching, redirection and refreshing is taken care of by the package. When you have a session, the button will change function to be a logout which will clear your cache and end your session in Reapit Connect.

The below example shows how to embed on any static or dynamic page with a single script. In the connectHasSessionCallback function we fetch a list of appointments from the Platform API to demonstrate the full flow.

Expand Down
2 changes: 1 addition & 1 deletion packages/connect-session/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reapit/connect-session",
"version": "1.0.0",
"version": "1.0.1",
"description": "OAuth Flow for Reapit Connect",
"keywords": [],
"homepage": "https://github.com/reapit/foundations#readme",
Expand Down
3 changes: 3 additions & 0 deletions packages/cra-template-foundations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

A quick start Create React App template for use with the Reapit Foundations Platform made with [Create-React-App](https://create-react-app.dev/)

For full documentaion [here](https://foundations-documentation.reapit.cloud/app-development/create-react-app-template).

## Basic Usage

1. Install the packages `npm install -g create-react-app @reapit/cra-template-foundations`
2. Execute `npx create-react-app <<your-app-name-here>> --template @reapit/cra-template-foundations`
3. Open the project in your text editor and insert your Reapit Connect ClientId from the Developer Portal into the `src/reapit.config.json` file.
Expand Down
2 changes: 1 addition & 1 deletion packages/cra-template-foundations/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reapit/cra-template-foundations",
"version": "1.0.0",
"version": "1.0.1",
"main": "./template.json",
"license": "MIT",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ A UI toolkit for building web applications in the Reapit Marketplace. Exports a

For the React Component Storybook visit [here](https://elements.reapit.cloud).

For detailed documentation [visit here](https://foundations-documentation.reapit.cloud/web/elements).
For detailed documentation and usage [visit here](https://foundations-documentation.reapit.cloud/app-development/elements).
2 changes: 1 addition & 1 deletion packages/elements/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reapit/elements",
"version": "1.0.0",
"version": "1.0.1",
"description": "A collection of React components and utilities for building apps for Reapit Marketplace",
"homepage": "https://github.com/reapit/foundations#readme",
"bugs": {
Expand Down
8 changes: 2 additions & 6 deletions packages/foundations-ts-definitions/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Foundations TS Definitions:

Automated TypeScript definitions for the Foundations API Platform. Automatically generates up to date TypeScript type definitions from Platform API swagger documentation. For usage visit [here](https://foundations-documentation.reapit.cloud/api/web#foundations-ts-definitions).
Automated TypeScript definitions for the Foundations API Platform. Automatically generates up to date TypeScript type definitions from Platform API swagger documentation.

- **Tech Stack**: NodeJS
- **Cloud Services**: NPM
- **Production**: https://www.npmjs.com/package/@reapit/foundations-ts-definitions

For detailed documentation [visit here](https://foundations-documentation.reapit.cloud/open-source/packages#foundations-ts-definitions).
For detailed documentation [visit here](https://foundations-documentation.reapit.cloud/app-development/foundations-ts-defintions).
5 changes: 1 addition & 4 deletions packages/react-app-scaffolder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

A CLI for generating React Apps, optimised for the marketplace, including Reapit Connect authentication and Elements.

For detailed documentation [visit here](https://foundations-documentation.reapit.cloud/open-source/packages#react-app-scaffolder).

For internal scaffolds, navigate to project folder and execute `yarn scaffold` to load the CLI.

## DEPRECATED
## DEPRECATED - Please use https://www.npmjs.com/package/@reapit/cra-template-foundations

We will continue to offer patches and bugfixes for this package for internal Reapit Users however, for Reapit Partner Developers we strongly suggest that you migrate to `@reapit/cra-template-foundations` for a better developer experience and the LTS benefits of Facebook's React Scripts package.


2 changes: 1 addition & 1 deletion packages/react-app-scaffolder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reapit/generator-react-app-scaffolder",
"version": "1.0.0",
"version": "1.0.1",
"description": "An opinionated gnerator for scaffolding TypeScript React Redux apps",
"keywords": [
"yeoman-generator"
Expand Down

0 comments on commit 8afc7ab

Please sign in to comment.