Skip to content

Commit e47a934

Browse files
committed
Merge branch 'master' into auth-services
2 parents 67dc11e + 9b0910f commit e47a934

File tree

7 files changed

+621
-399
lines changed

7 files changed

+621
-399
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<!-- Love accounts-js? Please consider supporting our collective:
2+
👉 https://opencollective.com/accounts-js/donate -->

CONTRIBUTING.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,41 @@ Alternatively, prepend your PR title with `[discuss]` to have a conversation aro
5151
* Should still submit a PR for changes (i.e. no work should be done on a branch directly; all work should be done in it's own separate feature branch), which should be okayed by one other team member before merging.
5252

5353
* Should squash merged PRs whenever possible (via GitHub options).
54+
55+
56+
## Financial contributions
57+
58+
We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/accounts-js).
59+
Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
60+
61+
62+
## Credits
63+
64+
65+
### Contributors
66+
67+
Thank you to all the people who have already contributed to accounts-js!
68+
<a href="graphs/contributors"><img src="https://opencollective.com/accounts-js/contributors.svg?width=890" /></a>
69+
70+
71+
### Backers
72+
73+
Thank you to all our backers! [[Become a backer](https://opencollective.com/accounts-js#backer)]
74+
75+
<a href="https://opencollective.com/accounts-js#backers" target="_blank"><img src="https://opencollective.com/accounts-js/backers.svg?width=890"></a>
76+
77+
78+
### Sponsors
79+
80+
Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/accounts-js#sponsor))
81+
82+
<a href="https://opencollective.com/accounts-js/sponsor/0/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/0/avatar.svg"></a>
83+
<a href="https://opencollective.com/accounts-js/sponsor/1/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/1/avatar.svg"></a>
84+
<a href="https://opencollective.com/accounts-js/sponsor/2/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/2/avatar.svg"></a>
85+
<a href="https://opencollective.com/accounts-js/sponsor/3/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/3/avatar.svg"></a>
86+
<a href="https://opencollective.com/accounts-js/sponsor/4/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/4/avatar.svg"></a>
87+
<a href="https://opencollective.com/accounts-js/sponsor/5/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/5/avatar.svg"></a>
88+
<a href="https://opencollective.com/accounts-js/sponsor/6/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/6/avatar.svg"></a>
89+
<a href="https://opencollective.com/accounts-js/sponsor/7/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/7/avatar.svg"></a>
90+
<a href="https://opencollective.com/accounts-js/sponsor/8/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/8/avatar.svg"></a>
91+
<a href="https://opencollective.com/accounts-js/sponsor/9/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/9/avatar.svg"></a>

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
*Fullstack authentication and accounts-management for GraphQL and REST*
44

5-
[![npm](https://img.shields.io/npm/v/@accounts/server.svg?maxAge=2592000)](https://www.npmjs.com/package/@accounts/accounts) [![CircleCI](https://circleci.com/gh/accounts-js/accounts.svg?style=svg)](https://circleci.com/gh/accounts-js/accounts) [![Coverage Status](https://coveralls.io/repos/github/accounts-js/accounts/badge.svg?branch=master)](https://coveralls.io/github/accounts-js/accounts?branch=master) ![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)
5+
[![Backers on Open Collective](https://opencollective.com/accounts-js/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/accounts-js/sponsors/badge.svg)](#sponsors) [![npm](https://img.shields.io/npm/v/@accounts/server.svg?maxAge=2592000)](https://www.npmjs.com/package/@accounts/accounts) [![CircleCI](https://circleci.com/gh/accounts-js/accounts.svg?style=svg)](https://circleci.com/gh/accounts-js/accounts) [![Coverage Status](https://coveralls.io/repos/github/accounts-js/accounts/badge.svg?branch=master)](https://coveralls.io/github/accounts-js/accounts?branch=master) ![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)
66

77
## Community
88

@@ -87,3 +87,33 @@ The following hooks are available:
8787
* `onRefreshTokensError`: the callback will call with the `AccountsError` object.
8888
* `onImpersonationSuccess`: will call with: `(originalUser, impersonationResult: { authorized, user, tokens: { refreshToken, accessToken }})`
8989
* `onImpersonationError`: the callback will call with the `AccountsError` object.
90+
91+
## Contributors
92+
93+
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
94+
<a href="graphs/contributors"><img src="https://opencollective.com/accounts-js/contributors.svg?width=890" /></a>
95+
96+
97+
## Backers
98+
99+
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/accounts-js#backer)]
100+
101+
<a href="https://opencollective.com/accounts-js#backers" target="_blank"><img src="https://opencollective.com/accounts-js/backers.svg?width=890"></a>
102+
103+
104+
## Sponsors
105+
106+
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/accounts-js#sponsor)]
107+
108+
<a href="https://opencollective.com/accounts-js/sponsor/0/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/0/avatar.svg"></a>
109+
<a href="https://opencollective.com/accounts-js/sponsor/1/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/1/avatar.svg"></a>
110+
<a href="https://opencollective.com/accounts-js/sponsor/2/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/2/avatar.svg"></a>
111+
<a href="https://opencollective.com/accounts-js/sponsor/3/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/3/avatar.svg"></a>
112+
<a href="https://opencollective.com/accounts-js/sponsor/4/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/4/avatar.svg"></a>
113+
<a href="https://opencollective.com/accounts-js/sponsor/5/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/5/avatar.svg"></a>
114+
<a href="https://opencollective.com/accounts-js/sponsor/6/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/6/avatar.svg"></a>
115+
<a href="https://opencollective.com/accounts-js/sponsor/7/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/7/avatar.svg"></a>
116+
<a href="https://opencollective.com/accounts-js/sponsor/8/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/8/avatar.svg"></a>
117+
<a href="https://opencollective.com/accounts-js/sponsor/9/website" target="_blank"><img src="https://opencollective.com/accounts-js/sponsor/9/avatar.svg"></a>
118+
119+

package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"clean": "lerna run clean",
77
"compile": "lerna run compile",
88
"lint": "tslint packages/*/{src,__tests__}/**/*.ts",
9-
"prebootstrap": "yarn install",
10-
"postinstall": "lerna bootstrap",
9+
"prebootstrap": "npm install",
10+
"postinstall": "lerna bootstrap && opencollective postinstall",
1111
"publish": "lerna publish",
1212
"publish:canary": "yarn run publish -- --canary",
1313
"test": "yarn lint && yarn compile && yarn coverage",
@@ -34,5 +34,13 @@
3434
"ts-jest": "^21.1.4",
3535
"tslint": "^5.8.0",
3636
"typescript": "^2.4.1"
37+
},
38+
"dependencies": {
39+
"opencollective": "^1.0.3"
40+
},
41+
"collective": {
42+
"type": "opencollective",
43+
"url": "https://opencollective.com/accounts-js",
44+
"logo": "https://opencollective.com/accounts-js/logo.txt"
3745
}
38-
}
46+
}

packages/client/src/accounts-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class AccountsClient {
5050
options: AccountsClientConfiguration,
5151
transport: TransportInterface
5252
) {
53-
this.options = options;
53+
this.options = { ...config, ...options };
5454
this.storage = options.tokenStorage || config.tokenStorage;
5555
if (!transport) {
5656
throw new AccountsError('A REST or GraphQL transport is required');

packages/server/src/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
config as sharedConfig,
77
PasswordSignupFields,
88
} from '@accounts/common';
9-
import { EmailTemplateType } from './email';
9+
import { EmailTemplatesType, EmailTemplateType } from './email';
1010

1111
// export type PasswordAuthenticator = (
1212
// user: PasswordLoginUserType,
@@ -53,6 +53,7 @@ export type AccountsServerConfiguration = AccountsCommonConfiguration & {
5353
tokenConfigs?: TokenConfig;
5454
// passwordAuthenticator?: PasswordAuthenticator;
5555
resumeSessionValidator?: ResumeSessionValidator;
56+
emailTemplates?: EmailTemplatesType;
5657
prepareMail?: PrepareMailFunction;
5758
sendMail?: SendMailFunction;
5859
// https://github.com/eleith/emailjs#emailserverconnectoptions

0 commit comments

Comments
 (0)