I'm trying out easy auth with a custom openid connect provider (identity server) and are trying to understand how I should be able to access my azure functions with an access token that I get from connect/token
(using a password grant).
I have added a custom provider to my azure function and if I go to https://example.net/.auth/login/TestProvider I get redirected to my identity server, can login and can access my azure functions. So from a browser everything seems to work fine.
So then I jumped to the next stop of trying to use a access token. So I go to https://learn.microsoft.com/en-us/azure/app-service/overview-authentication-authorization and read the section about logging in "with provider SDK" which seems to fit my case well.
Sadly they didn't have any example for custom providers (because it depends on the provider I guess) but I simply tried to do a post to https://example.net/.auth/login/TestProvider with a body like this:
{ "access_token": ".." }
But then it simply returns 400'id_token' field is required
so I start to read up a bit on id tokens and as I understand it's a token you can get from /connect/authorize
. But is that really what I am suppose to do? Because it seems like that endpoint would require me to login from the browser a well which I want to prevent?
So I guess my question is simply, what kind of steps should I take if I want to access my azure function programmatically (wihout having to use the browser but instead an access token) if I use a custom openid connect provider (identity server in my case)?