Ejemplo n.º 1
0
        [Route("api/forge/callback/oauth")] // see Web.Config FORGE_CALLBACK_URL variable
        public async Task <IActionResult> OAuthCallbackAsync(string code)
        {
            // create credentials form the oAuth CODE
            Credentials credentials = await Credentials.CreateFromCodeAsync(code, Response.Cookies);

            return(Redirect("/"));
        }
    [Route("api/forge/callback/oauth")] // see Web.Config FORGE_CALLBACK_URL variable
    public async Task<IActionResult> OAuthCallbackAsync(string code)
    {
      if (string.IsNullOrWhiteSpace(code)) return Redirect("/");
      // create credentials form the oAuth CODE
      Credentials credentials = await Credentials.CreateFromCodeAsync(code, Response.Cookies);

      return Redirect("/");
    }