CallbackPath implementation

我的未来我决定 提交于 2019-12-24 17:56:57

问题


I'm trying to use the various examples as a means to write my own, but I don't fully understand what is happening. Maybe someone can offer some insight.

I thought I needed to implement some URL that is listening for a callback from the 3rd party auth request, but when I look at the github implementation, for example, I see

public const string CallbackPath = "/signin-github";

and I don't see anything that is listening for that.


回答1:


The callback endpoint is managed by the OAuth2 generic handler:

  • https://github.com/aspnet/Security/blob/dev/src/Microsoft.AspNetCore.Authentication/RemoteAuthenticationHandler.cs#L40-L55
  • https://github.com/aspnet/Security/blob/dev/src/Microsoft.AspNetCore.Authentication.OAuth/OAuthHandler.cs#L45

You don't need to (and shouldn't) create your own route.



来源:https://stackoverflow.com/questions/49178819/callbackpath-implementation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!