way to pass access_token to typescript file retrieved using razor syntax #66

Closed
opened 2025-08-09 17:14:52 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @hnviradiya on 5/13/2018

What is the way to pass await Context.GetTokenAsync("access_token") to typescript file.

As storing this to hidden and then use it in typescript file does not seem right to me.

Is there any other way?

I want to set it to default header of axios which is in typescript file. But I am only able to access this value using Razor in cshtml.

*Originally created by @hnviradiya on 5/13/2018* What is the way to pass await Context.GetTokenAsync("access_token") to typescript file. As storing this to hidden and then use it in typescript file does not seem right to me. Is there any other way? I want to set it to default header of axios which is in typescript file. But I am only able to access this value using Razor in cshtml.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#66
No description provided.