Skip to content

Commit

Permalink
chore:
Browse files Browse the repository at this point in the history
이은상 committed Dec 27, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 8459c91 commit 8a7c36f
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions 7_auth/client/Context.jsx
Original file line number Diff line number Diff line change
@@ -27,22 +27,6 @@ export const AuthProvider = ({ children }) => {
const user = JSON.parse(atob(savedToken.split('.')[1]));
setUserInfo(user.username);
setIsAuthenticated(true);

// Attach token in the Authorization header for the request
fetch("/api/protected-remote-call", {
method: "GET",
headers: {
"Authorization": `Bearer ${savedToken}`
}
})
.then(response => response.json())
.then(data => {
console.log("Response from protected remote call:", data);
})
.catch(error => {
console.error("Error during remote call:", error);
});

} catch (error) {
console.error("Failed to parse token:", error);
// Remove invalid token

0 comments on commit 8a7c36f

Please sign in to comment.