@restorecommerce/facade 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/modules/identity/oauth/oauth.js +2 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,17 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [0.3.1](https://github.com/restorecommerce/libs/compare/@restorecommerce/facade@0.3.0...@restorecommerce/facade@0.3.1) (2022-02-23)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* **facade:** use token that was received from ids ([2508cfb](https://github.com/restorecommerce/libs/commit/2508cfb28c099000dad4c037a0eeb1883f152f05))
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
6
17
|
# [0.3.0](https://github.com/restorecommerce/libs/compare/@restorecommerce/facade@0.2.2...@restorecommerce/facade@0.3.0) (2022-02-22)
|
7
18
|
|
8
19
|
|
@@ -79,13 +79,12 @@ const createOAuth = () => {
|
|
79
79
|
code: ctx.request.query['code'],
|
80
80
|
state: ctx.request.query['state']
|
81
81
|
});
|
82
|
-
if (!user.user || !user.user.payload || (user.user.status && user.user.status.code !== 200)) {
|
82
|
+
if (!user.user || !user.user.payload || !user.token || (user.user.status && user.user.status.code !== 200)) {
|
83
83
|
ctx.type = 'html';
|
84
84
|
ctx.body = await exports.register(user.email || '');
|
85
85
|
return next();
|
86
86
|
}
|
87
|
-
|
88
|
-
ctx.cookies.set('token', token);
|
87
|
+
ctx.cookies.set('token', user.token.token);
|
89
88
|
ctx.status = 303;
|
90
89
|
ctx.redirect('/oauth2-account');
|
91
90
|
ctx.body = 'Redirecting to account page';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@restorecommerce/facade",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.1",
|
4
4
|
"description": "Facade for Restorecommerce microservices",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"typings": "dist/index.d.ts",
|
@@ -107,5 +107,5 @@
|
|
107
107
|
"publishConfig": {
|
108
108
|
"access": "public"
|
109
109
|
},
|
110
|
-
"gitHead": "
|
110
|
+
"gitHead": "e605e326cc47380032ef2217b6552a1068e9c0de"
|
111
111
|
}
|