Compare commits
4 Commits
0a0fbd4eae
...
1d1b7519fe
Author | SHA1 | Date |
---|---|---|
|
1d1b7519fe | |
|
abb260632f | |
|
63a9dff2b9 | |
|
437426cfc4 |
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@hono/oauth-providers': minor
|
||||
---
|
||||
|
||||
Add availbility to pass parameter state into OAuth middlewares
|
|
@ -12,10 +12,11 @@ export function facebookAuth(options: {
|
|||
fields: Fields[]
|
||||
client_id?: string
|
||||
client_secret?: string
|
||||
state?: string
|
||||
redirect_uri?: string
|
||||
}): MiddlewareHandler {
|
||||
return async (c, next) => {
|
||||
const newState = getRandomState()
|
||||
const newState = options.state || getRandomState()
|
||||
// Create new Auth instance
|
||||
const auth = new AuthFlow({
|
||||
client_id: options.client_id || (env(c).FACEBOOK_ID as string),
|
||||
|
|
|
@ -12,10 +12,11 @@ export function githubAuth(options: {
|
|||
client_secret?: string
|
||||
scope?: GitHubScope[]
|
||||
oauthApp?: boolean
|
||||
state?: string
|
||||
redirect_uri?: string
|
||||
}): MiddlewareHandler {
|
||||
return async (c, next) => {
|
||||
const newState = getRandomState()
|
||||
const newState = options.state || getRandomState()
|
||||
// Create new Auth instance
|
||||
const auth = new AuthFlow({
|
||||
client_id: options.client_id || (env(c).GITHUB_ID as string),
|
||||
|
|
|
@ -12,10 +12,11 @@ export function linkedinAuth(options: {
|
|||
client_secret?: string
|
||||
scope?: LinkedInScope[]
|
||||
appAuth?: boolean
|
||||
state?: string
|
||||
redirect_uri?: string
|
||||
}): MiddlewareHandler {
|
||||
return async (c, next) => {
|
||||
const newState = getRandomState()
|
||||
const newState = options.state || getRandomState()
|
||||
// Create new Auth instance
|
||||
const auth = new AuthFlow({
|
||||
client_id: options.client_id || (env(c).LINKEDIN_ID as string),
|
||||
|
|
|
@ -13,11 +13,12 @@ export function xAuth(options: {
|
|||
fields?: XFields[]
|
||||
client_id?: string
|
||||
client_secret?: string
|
||||
state?: string
|
||||
redirect_uri?: string
|
||||
}): MiddlewareHandler {
|
||||
return async (c, next) => {
|
||||
// Generate encoded "keys"
|
||||
const newState = getRandomState()
|
||||
const newState = options.state || getRandomState()
|
||||
const challenge = await getCodeChallenge()
|
||||
|
||||
const auth = new AuthFlow({
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# @hono/zod-openapi
|
||||
|
||||
## 0.19.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1127](https://github.com/honojs/middleware/pull/1127) [`63a9dff2b925a09e8597f327f954f332c3b59b14`](https://github.com/honojs/middleware/commit/63a9dff2b925a09e8597f327f954f332c3b59b14) Thanks [@sigmachirality](https://github.com/sigmachirality)! - chore: lock zod-to-openapi to `^7.3.0` to fix `z.custom`
|
||||
|
||||
## 0.19.4
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@hono/zod-openapi",
|
||||
"version": "0.19.4",
|
||||
"version": "0.19.5",
|
||||
"description": "A wrapper class of Hono which supports OpenAPI.",
|
||||
"type": "module",
|
||||
"module": "dist/index.js",
|
||||
|
@ -52,7 +52,7 @@
|
|||
"zod": "^3.22.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@asteasolutions/zod-to-openapi": "^7.1.0",
|
||||
"@asteasolutions/zod-to-openapi": "^7.3.0",
|
||||
"@hono/zod-validator": "workspace:^"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
@ -99,7 +99,7 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@asteasolutions/zod-to-openapi@npm:^7.1.0":
|
||||
"@asteasolutions/zod-to-openapi@npm:^7.3.0":
|
||||
version: 7.3.0
|
||||
resolution: "@asteasolutions/zod-to-openapi@npm:7.3.0"
|
||||
dependencies:
|
||||
|
@ -2363,7 +2363,7 @@ __metadata:
|
|||
resolution: "@hono/zod-openapi@workspace:packages/zod-openapi"
|
||||
dependencies:
|
||||
"@arethetypeswrong/cli": "npm:^0.17.4"
|
||||
"@asteasolutions/zod-to-openapi": "npm:^7.1.0"
|
||||
"@asteasolutions/zod-to-openapi": "npm:^7.3.0"
|
||||
"@hono/zod-validator": "workspace:^"
|
||||
publint: "npm:^0.3.9"
|
||||
tsup: "npm:^8.4.0"
|
||||
|
|
Loading…
Reference in New Issue