Skip to content

Commit b7144bd

Browse files
committedFeb 26, 2025
Mod /authenticate to pass token in header.
1 parent 9295bd1 commit b7144bd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎context/AppContextProvider.tsx

+9-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,15 @@ const AppContextProvider = ({ children }: AppContextProviderProps) => {
8080
try {
8181
setIsSigningInUser(true);
8282
const pioneerAuth: AuthResult = await window.Pi.authenticate(['username', 'payments'], onIncompletePaymentFound);
83-
const res = await axiosClient.post("/users/authenticate", {pioneerAuth});
83+
const res = await axiosClient.post(
84+
"/users/authenticate",
85+
{}, // empty body
86+
{
87+
headers: {
88+
Authorization: `Bearer ${pioneerAuth.accessToken}`,
89+
},
90+
}
91+
);
8492

8593
if (res.status === 200) {
8694
setAuthToken(res.data?.token);

0 commit comments

Comments
 (0)