Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

How to set AntiForgeryToken in app

$
0
0

Hi, I'm actually building an Forms app which uses aspnet core webapi. For authentication I use following code inside the webapi

[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public async Task Login(LoginViewModel model, string returnUrl = null)
{
if (ModelState.IsValid)
{
...

So what do I have to set in my app to get the antiforgerytoken to my next api calls (after the Login worked)?

On Html it would be @Html.AntiForgeryToken().

Any ideas?

KR Martin


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>