Skip to content

Commit aea16f1

Browse files
committed
fix: restore documents
1 parent 07bc45f commit aea16f1

File tree

8 files changed

+69
-20
lines changed

8 files changed

+69
-20
lines changed

Diff for: .github/ISSUE_TEMPLATE.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
11
In order to efficiently and accurately address your issue or feature request, please read through the template below and answer all relevant questions. Your additional work here is greatly appreciated and will help us respond as quickly as possible. Please delete any sections or questions below that do not pertain to this request.
22

3+
For general support or usage questions, please use the [Auth0 Community](https://community.auth0.com/) or [Auth0 Support](https://support.auth0.com).
4+
35
### Description
46

57
Description of the bug or feature request and why it's a problem. Consider including:
68

79
- The use case or overall problem you're trying to solve
810
- Information about when the problem started
911

12+
### Prerequisites
13+
14+
- [ ] I have checked the [README documentation](https://github.com/auth0/angular2-jwt/blob/master/README.md).
15+
- [ ] I have checked the [Auth0 Community](https://community.auth0.com/) for related posts.
16+
- [ ] I have checked for related or duplicate [Issues](https://github.com/auth0/angular2-jwt
17+
/issues) and [PRs](https://github.com/auth0/angular2-jwt
18+
/pulls).
19+
- [ ] I have read the [Auth0 general contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md).
20+
- [ ] I have read the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md).
21+
- [ ] I am reporting this to the correct repository.
1022

1123
### Environment
1224

Diff for: .github/PULL_REQUEST_TEMPLATE.md

+2
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ Please include relevant links supporting this change such as a:
1919

2020
### Checklist
2121

22+
- [ ] I have read the [Auth0 general contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md)
23+
- [ ] I have read the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md)
2224
- [ ] All code quality tools/guidelines in the [CONTRIBUTING documentation](../CONTRIBUTING.md) have been run/followed
2325
- [ ] All relevant assets have been compiled as directed in the [CONTRIBUTING documentation](../CONTRIBUTING.md), if applicable

Diff for: CHANGELOG.md

-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# Change log
22

3-
## Version [4.0.3](https://github.com/auth0/avatsaev/tags/v4.0.3) (2020-02-70)
4-
5-
- Angular 9 compatibility
6-
- Angular Ivy compatibility
7-
83
## Version [3.0.1](https://github.com/auth0/angular2-jwt/tags/v3.0.1) (2019-10-28)
94

105
[Full Changelog](https://github.com/auth0/angular2-jwt/compare/3.0.0..3.0.1)

Diff for: CONTRIBUTING.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
# Contribution
2+
3+
Please read [Auth0's contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md).
14

25
## Documentation
36

47
- PR for docs site update, if needed
58
- Code-level documentation expectations
69
- 100% documentation coverage for PRs
10+
- Include links to relevant Auth0 doc pages
711

812
## Code quality tools
913

Diff for: LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2020 Aslan Vatsaev
3+
Copyright (c) 2017 Auth0 Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Diff for: README.md

+43-13
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1-
# @avatsaev/angular-jwt
1+
# @auth0/angular-jwt
22

3-
[![npm version](https://badge.fury.io/js/%40avatsaev%2Fangular-jwt.svg)](https://badge.fury.io/js/%40avatsaev%2Fangular-jwt)
3+
[![npm version](https://badge.fury.io/js/%40auth0%2Fangular-jwt.svg)](https://badge.fury.io/js/%40auth0%2Fangular-jwt)
4+
5+
### **NOTE:** This library is now at version 3 and is published on npm as `@auth0/angular-jwt`. If you're looking for the pre-v1.0 version of this library, it can be found in the `pre-v1.0` branch and on npm as `angular2-jwt`.
6+
7+
**@auth0/angular-jwt v3 is to be used with Angular v6+ and RxJS v6+. For Angular v4.3 to v5+, use @auth0/angular-jwt v1**
8+
9+
This library provides an `HttpInterceptor` which automatically attaches a [JSON Web Token](https://jwt.io) to `HttpClient` requests.
10+
11+
This library does not have any functionality for (or opinion about) implementing user authentication and retrieving JWTs to begin with. Those details will vary depending on your setup, but in most cases, you will use a regular HTTP request to authenticate your users and then save their JWTs in local storage or in a cookie if successful.
12+
13+
> **Note:** This library can only be used with Angular 4.3 and higher because it relies on an `HttpInterceptor` from Angular's `HttpClient`. This feature is not available on lower versions.
414
515
## Installation
616

717
```bash
818
# installation with npm
9-
npm install @avatsaev/angular-jwt
19+
npm install @auth0/angular-jwt
1020

1121
# installation with yarn
12-
yarn add @avatsaev/angular-jwt
22+
yarn add @auth0/angular-jwt
1323
```
1424

1525
## Usage: Standalone
@@ -19,7 +29,7 @@ injectable features, you can simply create an instance of the utility and use it
1929
directly:
2030

2131
```ts
22-
import { JwtHelperService } from "@avatsaev/angular-jwt";
32+
import { JwtHelperService } from "@auth0/angular-jwt";
2333

2434
const helper = new JwtHelperService();
2535

@@ -35,7 +45,7 @@ Import the `JwtModule` module and add it to your imports list. Call the `forRoot
3545
Be sure to import the `HttpClientModule` as well.
3646

3747
```ts
38-
import { JwtModule } from "@avatsaev/angular-jwt";
48+
import { JwtModule } from "@auth0/angular-jwt";
3949
import { HttpClientModule } from "@angular/common/http";
4050

4151
export function tokenGetter() {
@@ -97,7 +107,7 @@ JwtModule.forRoot({
97107

98108
Authenticated requests should only be sent to domains you know and trust. Many applications make requests to APIs from multiple domains, some of which are not controlled by the developer. Since there is no way to know what the API being called will do with the information contained in the request, it is best to not send the user's token to all APIs in a blind fashion.
99109

100-
List any domains you wish to allow authenticated requests to be sent to by specifying them in the the `whitelistedDomains` array. **Note that standard http port 80 and https port 443 requests don't require a port to be specified. A port is only required in the whitelisted host name if you are authenticating against a non-standard port e.g. localhost:3001**
110+
List any domains you wish to allow authenticated requests to be sent to by specifying them in the `whitelistedDomains` array. **Note that standard http port 80 and https port 443 requests don't require a port to be specified. A port is only required in the whitelisted host name if you are authenticating against a non-standard port e.g. localhost:3001**
101111

102112
```ts
103113
// ...
@@ -212,7 +222,7 @@ Import the `JWT_OPTIONS` `InjectionToken` so that you can instruct it to use you
212222
Create a factory function and specify the options as you normally would if you were using `JwtModule.forRoot` directly. If you need to use a service in the function, list it as a parameter in the function and pass it in the `deps` array when you provide the function.
213223

214224
```ts
215-
import { JwtModule, JWT_OPTIONS } from '@avatsaev/angular-jwt';
225+
import { JwtModule, JWT_OPTIONS } from '@auth0/angular-jwt';
216226
import { TokenService } from './app.tokenservice';
217227

218228
// ...
@@ -249,7 +259,7 @@ NOTE: If a `jwtOptionsFactory` is defined, then `config` is ignored. _Both confi
249259
The custom factory function approach described above can be used to get a token asynchronously with Ionic's `Storage`.
250260

251261
```ts
252-
import { JwtModule, JWT_OPTIONS } from '@avatsaev/angular-jwt';
262+
import { JwtModule, JWT_OPTIONS } from '@auth0/angular-jwt';
253263
import { Storage } from '@ionic/storage';
254264

255265
export function jwtOptionsFactory(storage) {
@@ -285,7 +295,7 @@ This service contains helper functions:
285295
## isTokenExpired (old tokenNotExpired function)
286296

287297
```
288-
import { JwtHelperService } from '@avatsaev/angular-jwt';
298+
import { JwtHelperService } from '@auth0/angular-jwt';
289299
// ...
290300
constructor(public jwtHelper: JwtHelperService) {}
291301
@@ -297,7 +307,7 @@ console.log(this.jwtHelper.isTokenExpired()); // true or false
297307
## getTokenExpirationDate
298308

299309
```
300-
import { JwtHelperService } from '@avatsaev/angular-jwt';
310+
import { JwtHelperService } from '@auth0/angular-jwt';
301311
// ...
302312
constructor(public jwtHelper: JwtHelperService) {}
303313
@@ -309,7 +319,7 @@ console.log(this.jwtHelper.getTokenExpirationDate()); // date
309319
## decodeToken
310320

311321
```
312-
import { JwtHelperService } from '@avatsaev/angular-jwt';
322+
import { JwtHelperService } from '@auth0/angular-jwt';
313323
// ...
314324
constructor(public jwtHelper: JwtHelperService) {}
315325
@@ -318,9 +328,29 @@ console.log(this.jwtHelper.decodeToken(token)); // token
318328
}
319329
```
320330

331+
## What is Auth0?
332+
333+
Auth0 helps you to:
334+
335+
- Add authentication with [multiple authentication sources](https://auth0.com/docs/identityproviders), either social like **Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce, among others**, or enterprise identity systems like **Windows Azure AD, Google Apps, Active Directory, ADFS or any SAML Identity Provider**.
336+
- Add authentication through more traditional **[username/password databases](https://auth0.com/docs/connections/database/custom-db)**.
337+
- Add support for **[linking different user accounts](https://auth0.com/docs/link-accounts)** with the same user.
338+
- Support for generating signed [Json Web Tokens](https://auth0.com/docs/jwt) to call your APIs and **flow the user identity** securely.
339+
- Analytics of how, when and where users are logging in.
340+
- Pull data from other sources and add it to the user profile, through [JavaScript rules](https://auth0.com/docs/rules/current).
341+
342+
## Create a free Auth0 account
343+
344+
1. Go to [Auth0](https://auth0.com/signup) and click Sign Up.
345+
2. Use Google, GitHub or Microsoft Account to login.
346+
347+
## Issue Reporting
348+
349+
If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues.
350+
321351
## Author
322352

323-
[Aslan Vatsaev](https://github.com/avatsaev)
353+
[Auth0](auth0.com)
324354

325355
## License
326356

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",
7-
"build": "ng build angular-jwt",
7+
"build": "ng build angular-jwt --prod",
88
"postbuild": "cp ./README.md ./CHANGELOG.md ./LICENSE ./dist/angular-jwt/",
99
"test": "ng test",
1010
"lint": "ng lint",

Diff for: projects/angular-jwt/tsconfig.lib.prod.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig.lib.json",
3+
"angularCompilerOptions": {
4+
"enableIvy": false
5+
}
6+
}

0 commit comments

Comments
 (0)