fix: use public wpUrl runtime config for auth refresh token mutation
This commit is contained in:
@@ -42,8 +42,8 @@ function getAuthUser(user: AuthUserFragment): User {
|
||||
|
||||
// Refresh auth token by calling remote GraphQL endpoint directly
|
||||
export async function refreshAuthToken(refreshToken: string): Promise<string | undefined> {
|
||||
// TODO: const { public: { graphql: { endpoint } } } = useRuntimeConfig();
|
||||
const endpoint = `${process.env.NUXT_WP_URL || "https://cultureat.ledevsimple.ca"}/graphql`;
|
||||
const { public: { wpUrl } } = useRuntimeConfig();
|
||||
const endpoint = `${wpUrl}/graphql`;
|
||||
const { data } = await executeGraphQLHTTP<ResultOf<"AuthRefreshToken">>({
|
||||
query: AuthRefreshTokenDocument,
|
||||
variables: { refreshToken },
|
||||
|
||||
Reference in New Issue
Block a user