Update templates/protected.html
Browse files- templates/protected.html +3 -0
templates/protected.html
CHANGED
@@ -11,6 +11,9 @@
|
|
11 |
<h1>Protected Route</h1>
|
12 |
<p>Welcome, {{user}}!</p>
|
13 |
<script>
|
|
|
|
|
|
|
14 |
function getProtectedResource() {
|
15 |
const token = retrieveAccessToken(); // Implement this function to get the stored token
|
16 |
fetch('/protected', {
|
|
|
11 |
<h1>Protected Route</h1>
|
12 |
<p>Welcome, {{user}}!</p>
|
13 |
<script>
|
14 |
+
function retrieveAccessToken() {
|
15 |
+
return localStorage.getItem("access_token");
|
16 |
+
}
|
17 |
function getProtectedResource() {
|
18 |
const token = retrieveAccessToken(); // Implement this function to get the stored token
|
19 |
fetch('/protected', {
|