Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Commit 21cc29f

Browse files
authored
refactor(authlify): expose authlifyToken directly (#313)
* refactor(authlify): expose `authlifyToken` directly * remove unneeded eslint comment
1 parent d37576a commit 21cc29f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/lib/secrets_helper.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,15 @@ const formatSecrets = (result: OneGraphSecretsResponse | undefined) => {
135135

136136
type OneGraphPayload = { authlifyToken: string | undefined }
137137

138-
export type HandlerEventWithOneGraph = HandlerEvent & { _oneGraph: OneGraphPayload }
138+
export type HandlerEventWithOneGraph = HandlerEvent & OneGraphPayload
139139

140140
// Note: We may want to have configurable "sets" of secrets,
141141
// e.g. "dev" and "prod"
142142
export const getSecrets = async (
143143
event?: HandlerEventWithOneGraph | HandlerEvent | undefined,
144144
): Promise<NetlifySecrets> => {
145145
// Allow us to get the token from event if present, else fallback to checking the env
146-
// eslint-disable-next-line no-underscore-dangle
147-
const eventToken = (event as HandlerEventWithOneGraph)?._oneGraph?.authlifyToken
146+
const eventToken = (event as HandlerEventWithOneGraph)?.authlifyToken
148147
const secretToken = eventToken || env.ONEGRAPH_AUTHLIFY_TOKEN
149148

150149
if (!secretToken) {

0 commit comments

Comments
 (0)