File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -263,17 +263,17 @@ const disabledFunctions = () => {
263263
264264const validateToken = async ( ) => {
265265 try {
266- const accessToken = await mtLinkSdk . exchangeToken ( ) ;
267- elements . accessTokenLabel . innerText = `Your access token is ${ accessToken } .` ;
266+ const token = await mtLinkSdk . exchangeToken ( ) ;
267+ elements . accessTokenLabel . innerText = `Your access token is ${ token . access_token } .` ;
268268 const authHeaders = new Headers ( {
269269 method : 'GET' ,
270- Authorization : `Bearer ${ accessToken } `
270+ Authorization : `Bearer ${ token . access_token } `
271271 } ) ;
272272 const response = await fetch ( 'https://myaccount-staging.getmoneytree.com/oauth/token/info.json' , {
273273 headers : authHeaders
274274 } ) ;
275275 const data : ITokenInfo = await response . json ( ) ;
276- elements . accessTokenLabel . innerText = `Your access token is ${ accessToken }
276+ elements . accessTokenLabel . innerText = `Your access token is ${ token . access_token }
277277 It was generated for the app: ${ data . aud . name } .
278278 It will expire on ${ new Date ( data . exp * 1000 ) } .
279279 It allows you to: ${ data . scopes . join ( ', ' ) }
You can’t perform that action at this time.
0 commit comments