Skip to content

Commit

Permalink
Merge branch 'release/0.0.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
DominusKelvin committed Feb 26, 2024
2 parents 056572d + 8e07cef commit f9737f2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
20 changes: 8 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,18 +147,14 @@ module.exports = function defineWishHook(sails) {
case 'google':
if (!idToken) throw Error(`${idToken} is not a valid id_token`)
try {
try {
user = await sails.helpers.fetch(
`${sails.config.wish[provider].userUrl}&access_token=${accessToken}`,
{
headers: {
Authorization: `Bearer ${idToken}`,
},
}
)
} catch (error) {
throw error
}
user = await sails.helpers.fetch(
`${sails.config.wish[provider].userUrl}&access_token=${accessToken}`,
{
headers: {
Authorization: `Bearer ${idToken}`,
},
}
)
} catch (error) {
throw error
}
Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "sails-hook-wish",
"version": "0.0.7",
"description": "The OAuth hook you wish exists for Sails",
"main": "index.js",
"keywords": [
"sails oauth",
"github oauth",
Expand All @@ -11,6 +12,9 @@
"sails": {
"isHook": true
},
"bugs": {
"url": "https://github.com/sailscastshq/sails-hook-wish/issues"
},
"devDependencies": {
"@commitlint/cli": "^17.6.6",
"@commitlint/config-conventional": "^17.6.6",
Expand All @@ -23,6 +27,10 @@
"@sailscasts/sails-hook-node-fetch": "^0.0.3",
"sails": "^1.5.2"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sailscastshq/sails-hook-wish.git"
},
"author": "Kelvin Omereshone<kelvin@sailscasts.com>",
"license": "MIT",
"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions tea.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# https://tea.xyz/what-is-this-file
---
version: 1.0.0
codeOwners:
- '0x6535eAC72ea8603FDE6E24458c46210EC2763646'
quorum: 1

0 comments on commit f9737f2

Please sign in to comment.