File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,9 @@ netlifyIdentity.close();
71
71
72
72
// Log out the user
73
73
netlifyIdentity .logout ();
74
+ // refresh the user's JWT
75
+ // Note: this method returns a promise.
76
+ netlifyIdentity .refresh ().then ((jwt )=> console .log (jwt))
74
77
```
75
78
76
79
#### A note on script tag versioning
@@ -113,6 +116,10 @@ netlifyIdentity.close();
113
116
// Log out the user
114
117
netlifyIdentity .logout ();
115
118
119
+ // refresh the user's JWT
120
+ // Note: this method returns a promise.
121
+ netlifyIdentity .refresh ().then ((jwt )=> console .log (jwt))
122
+
116
123
// Access the underlying GoTrue JS client.
117
124
// Note that doing things directly through the GoTrue client brings a risk of getting out of
118
125
// sync between your state and the widget’s state.
You can’t perform that action at this time.
0 commit comments