Skip to content

Commit

Permalink
fix(sessionstrategy): fixed the type exposition
Browse files Browse the repository at this point in the history
  • Loading branch information
meza committed Jul 9, 2023
1 parent 389a1df commit 2b0aaf4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 1 addition & 5 deletions src/Auth0RemixTypes.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { SessionStrategy } from './index.js';
import type { SessionStorage } from '@remix-run/server-runtime';
import type { Camelize } from 'camelize-ts';
import type { JsonObject, JsonValue, SetOptional } from 'type-fest';
Expand Down Expand Up @@ -66,11 +67,6 @@ export interface ClientCredentials {
usePost?: boolean | undefined;
}

export enum SessionStrategy {
Browser = 'browser',
Server = 'server'
}

export interface SessionStore {
key: string;
store: SessionStorage;
Expand Down
3 changes: 1 addition & 2 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
import { redirect } from '@remix-run/server-runtime';
import * as jose from 'jose';
import { afterEach, beforeEach, describe, expect, it, SpyInstance, vi } from 'vitest';
import { SessionStrategy } from './Auth0RemixTypes.js';
import { getCredentials, saveUserToSession } from './lib/session.js';
import { Auth0RemixServer, Token } from './index.js';
import { Auth0RemixServer, Token, SessionStrategy } from './index.js';
import type { Auth0RemixOptions } from './Auth0RemixTypes.js';
import type { AppLoadContext } from '@remix-run/server-runtime';

Expand Down
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { redirect } from '@remix-run/server-runtime';
import * as jose from 'jose';
import { SessionStrategy } from './Auth0RemixTypes.js';
import { ensureDomain } from './lib/ensureDomainFormat.js';
import { getCredentials, saveUserToSession } from './lib/session.js';
import { transformUserData } from './lib/transformUserData.js';
Expand All @@ -24,6 +23,11 @@ export enum Token {
ACCESS = 'access'
}

export enum SessionStrategy {
Browser = 'browser',
Server = 'server'
}

interface Auth0Urls {
authorizationURL: string;
openIDConfigurationURL: string;
Expand Down

0 comments on commit 2b0aaf4

Please sign in to comment.