Skip to content

Commit 42ff17a

Browse files
authored
preparing 0.1.0
1 parent 3cf498b commit 42ff17a

File tree

3 files changed

+44
-6
lines changed

3 files changed

+44
-6
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog for `react-static-web-apps-auth`
2+
3+
## [0.1.0] - 2020-12-18
4+
5+
Initial Release 🎉
6+
7+
## Added
8+
9+
- Components for login
10+
- Component for logout
11+
- Component for purging user profiles
12+
- Context for accessing user profile

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Static Web App Auth tools for React
22

3-
This package is a series of helper tools for working with [Azure Static Web Apps](https://docs.microsoft.com/azure/static-web-apps/) [Authentication and Authorization](https://docs.microsoft.com/azure/static-web-apps/authentication-authorization) from React.
3+
![Node.js CI](https://github.com/aaronpowell/react-static-web-apps-auth/workflows/Node.js%20CI/badge.svg) | [![npm version](https://img.shields.io/npm/v/react-static-web-apps-auth)](https://npmjs.org/package/react-static-web-apps-auth)
4+
5+
This package is a series of helper tools for working with [Azure Static Web Apps](https://docs.microsoft.com/azure/static-web-apps/?WT.mc_id=javascript-12079-aapowell) [Authentication and Authorization](https://docs.microsoft.com/azure/static-web-apps/authentication-authorization?WT.mc_id=javascript-12079-aapowell) from React.
46

57
## Installation
68

@@ -47,7 +49,7 @@ const App = () => {
4749
};
4850
```
4951

50-
This component provides React Context for the current user (or a series of `undefined` values when you're not logged in), aligning with the information available [in the Client Principal](https://docs.microsoft.com/azure/static-web-apps/user-information?tabs=javascript#client-principal-data).
52+
This component provides React Context for the current user (or a series of `undefined` values when you're not logged in), aligning with the information available [in the Client Principal](https://docs.microsoft.com/azure/static-web-apps/user-information?tabs=javascript#client-principal-data&WT.mc_id=javascript-12079-aapowell).
5153

5254
Additionally, a `useContext` React Hook is available, `useUserInfo`, for use within the application.
5355

@@ -59,7 +61,13 @@ To redirect to a specific URL post-logout, provide the path in the `postLogoutRe
5961

6062
### `<UserPurge />`
6163

62-
This component provides the user with the ability to [remove their identifying information from Static Web Apps](https://docs.microsoft.com/azure/static-web-apps/authentication-authorization#remove-personal-identifying-information). By default it'll only purge them from the current domain, but set the `globally` prop to `true` if you with to give them the ability to completely remove themselves from Static Web Apps.
64+
This component provides the user with the ability to [remove their identifying information from Static Web Apps](https://docs.microsoft.com/azure/static-web-apps/authentication-authorization?WT.mc_id=javascript-12079-aapowell#remove-personal-identifying-information). By default it'll only purge them from the current domain, but set the `globally` prop to `true` if you with to give them the ability to completely remove themselves from Static Web Apps.
65+
66+
## Styling
67+
68+
Each of the components generates minimal HTML (a single `<a>` tag) to make it easier to style within an application. The DOM elements have the class `azure-swa-auth`, defined in `./constants` as `StaticWebAppsClassName`, on them, along with the component type, `login`, `logout` or `purge`.
69+
70+
Additionally, the login components have the provider as a class, so providers can be styled individually.
6371

6472
## License
6573

react-static-web-apps-auth/package.json

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@aaronpowell/react-static-web-apps-auth",
33
"version": "0.1.0",
4-
"description": "",
4+
"description": "A library to help creating authenticated React apps on Azure Static Web Apps",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",
77
"scripts": {
@@ -10,7 +10,16 @@
1010
"lint": "eslint src/**/*.ts",
1111
"lint:fix": "npm run lint -- --fix"
1212
},
13-
"keywords": [],
13+
"keywords": [
14+
"react",
15+
"azure",
16+
"cloud",
17+
"serverless",
18+
"hosting",
19+
"static",
20+
"authentication",
21+
"staticwebapp"
22+
],
1423
"author": {
1524
"name": "Aaron Powell",
1625
"email": "[email protected]",
@@ -38,5 +47,14 @@
3847
"peerDependencies": {
3948
"react": "^17.0.1",
4049
"react-dom": "^17.0.1"
41-
}
50+
},
51+
"repository": {
52+
"type": "git",
53+
"url": "https://github.com/aaronpowell/react-static-web-apps-auth"
54+
},
55+
"bugs": {
56+
"url": "https://github.com/aaronpowell/react-static-web-apps-auth/issues"
57+
},
58+
"homepage": "https://github.com/aaronpowell/react-static-web-apps-auth",
59+
"private": false
4260
}

0 commit comments

Comments
 (0)