Skip to content

Commit

Permalink
Merge branch 'atinux:main' into feature/add-server-side-session-storage
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-hofmann authored Feb 6, 2025
2 parents 242f009 + 91a8ae1 commit 78507a0
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# Changelog


## v0.5.14

[compare changes](https://github.com/atinux/nuxt-auth-utils/compare/v0.5.13...v0.5.14)

### 🩹 Fixes

- Move atproto util in runtime ([ff2ddc9](https://github.com/atinux/nuxt-auth-utils/commit/ff2ddc9))

### ❤️ Contributors

- Sébastien Chopin <[email protected]>

## v0.5.13

[compare changes](https://github.com/atinux/nuxt-auth-utils/compare/v0.5.12...v0.5.13)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuxt-auth-utils",
"version": "0.5.13",
"version": "0.5.14",
"description": "Add Authentication to Nuxt applications with secured & sealed cookies sessions.",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { defu } from 'defu'
import { randomUUID } from 'uncrypto'
import type { ScryptConfig } from '@adonisjs/hash/types'
import type { SessionConfig } from 'h3'
import { atprotoProviderDefaultClientMetadata, atprotoProviders, getClientMetadataFilename } from './utils/atproto'
import { atprotoProviderDefaultClientMetadata, atprotoProviders, getClientMetadataFilename } from './runtime/utils/atproto'
import type { AtprotoProviderClientMetadata } from './runtime/types/atproto'

// Module options TypeScript interface definition
Expand Down Expand Up @@ -302,7 +302,7 @@ export default defineNuxtModule<ModuleOptions>({

for (const provider of atprotoProviders) {
addServerHandler({
handler: resolver.resolve('./runtime/server/routes/atproto/client-metadata.json.get.ts'),
handler: resolver.resolve('./runtime/server/routes/atproto/client-metadata.json.get'),
route: '/' + getClientMetadataFilename(provider, runtimeConfig.oauth[provider] as AtprotoProviderClientMetadata),
method: 'get',
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineEventHandler, createError } from 'h3'
import { getAtprotoClientMetadata } from '../../utils/atproto'
import { atprotoProviders, getClientMetadataFilename } from '../../../../utils/atproto'
import { atprotoProviders, getClientMetadataFilename } from '../../../utils/atproto'
import type { AtprotoProviderClientMetadata } from '../../../types/atproto'
import { useRuntimeConfig } from '#imports'

Expand Down
4 changes: 2 additions & 2 deletions src/runtime/server/utils/atproto.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { H3Event } from 'h3'
import type { OAuthClientMetadataInput, OAuthGrantType } from '@atproto/oauth-client-node'
import type { AtprotoProviderClientMetadata } from '../../types/atproto'
import type { OAuthBlueskyConfig } from '../lib/oauth/bluesky'
import type { OAuthBlueskyConfig } from '../lib/atproto/bluesky'
import { getOAuthRedirectURL } from '../lib/utils'
import { getClientMetadataFilename } from '../../../utils/atproto'
import { getClientMetadataFilename } from '../../utils/atproto'
import type { ATProtoProvider, OAuthConfig } from '#auth-utils'
import { getRequestURL, useRuntimeConfig } from '#imports'

Expand Down
4 changes: 2 additions & 2 deletions src/utils/atproto.ts → src/runtime/utils/atproto.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ATProtoProvider, OAuthProvider } from '../runtime/types'
import type { AtprotoProviderClientMetadata } from '../runtime/types/atproto'
import type { ATProtoProvider, OAuthProvider } from '../types'
import type { AtprotoProviderClientMetadata } from '../types/atproto'

export const atprotoProviders = ['bluesky'] satisfies ATProtoProvider[]

Expand Down

0 comments on commit 78507a0

Please sign in to comment.