Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAuthV3 Support for authentication providers #2257

Closed
5 tasks
thabaum opened this issue Aug 21, 2018 · 7 comments
Closed
5 tasks

OAuthV3 Support for authentication providers #2257

thabaum opened this issue Aug 21, 2018 · 7 comments

Comments

@thabaum
Copy link
Contributor

thabaum commented Aug 21, 2018

Description

OAuthV3 is now the latests version of OAuth supported by Authentication Providers such as Facebook, Twitters, ect.

DNN Platform/Library/Services/Authentication/OAuth/OAuthClientBase.cs

Supports up to OAuthV2 line 213

Current providers for Facebook, Twitter... fail to work as needed to allow login/registration.

  • [x ] 9.2.1
  • [x ] 9.2.0
  • [x ] 9.1.1
  • [x ] 9.1
  • [x ] 9.0

Affected browser

  • Chrome
  • Firefox
  • Safari
  • Internet Explorer
  • Edge
@thabaum
Copy link
Contributor Author

thabaum commented Aug 21, 2018

InnerMessage:Object reference not set to an instance of an object.

InnerStackTrace:

at DotNetNuke.Services.Authentication.OAuth.OAuthClientBase.ExecuteWebRequest(HttpMethod method, Uri uri, String parameters, String authHeader) at DotNetNuke.Services.Authentication.OAuth.OAuthClientBase.ExchangeCodeForToken() at DotNetNuke.Services.Authentication.OAuth.OAuthClientBase.AuthorizeV2() at DotNetNuke.Services.Authentication.OAuth.OAuthLoginBase.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

@thabaum
Copy link
Contributor Author

thabaum commented Aug 21, 2018

#1897

Not sure if this PR is related...

Maybe something here:

https://github.com/dnnsoftware/Dnn.Platform/blob/development/DNN%20Platform/Library/Services/Authentication/OAuth/OAuthLoginBase.cs

` protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);

        if (!IsPostBack)
        {
            //Save the return Url in the cookie
            HttpContext.Current.Response.Cookies.Set(new HttpCookie("returnurl", RedirectURL)
            {
                Expires = DateTime.Now.AddMinutes(5),
                Path = (!string.IsNullOrEmpty(Globals.ApplicationPath) ? Globals.ApplicationPath : "/")
            });
        }


        bool shouldAuthorize = OAuthClient.IsCurrentService() && OAuthClient.HaveVerificationCode();
        if(Mode == AuthMode.Login)
        {
            shouldAuthorize = shouldAuthorize || OAuthClient.IsCurrentUserAuthorized();
        }


        if (shouldAuthorize)
        {
            if (OAuthClient.Authorize() == AuthorisationResult.Authorized)
            {
                OAuthClient.AuthenticateUser(GetCurrentUser(), PortalSettings, IPAddress, AddCustomProperties, OnUserAuthenticated);
            }
        }
    }`

@valadas
Copy link
Contributor

valadas commented Jul 27, 2019

@thabaum did #2479 fix this for facebook too or this issue is still needed ?

@valadas valadas added this to the 9.4.1 milestone Jul 27, 2019
@valadas valadas modified the milestones: 9.4.1, 9.4.2 Sep 26, 2019
@SkyeHoefling
Copy link
Contributor

SkyeHoefling commented Oct 16, 2019

@valadas there is no support for OAuthV3 in the DNN Authentication Providers. While I haven't looked into the OAuth V3 specification we should add new V3 APIs to the provider to make it easier to integrate with. Any change that has been made to current providers is most likely a work-around to support the new specification. We should investigate and make some decisions on how we want to proceed.

If OAuth 3.0 is starting to be adopted throughout the industry we should try and get this done by 10.0 if not sooner

Edit

After doing some quick research it doesn't appear that there is an OAuth 3.0 spec. Is there any docs anyone can provide on this?

@valadas
Copy link
Contributor

valadas commented Oct 17, 2019

Cool, I gonna make this an enhancement then

@thabaum
Copy link
Contributor Author

thabaum commented Oct 17, 2019

This killed my web community when I made this report... so many users still cannot log I am sure gave up by now. I had to remove all authentication providers and I am pretty scared to add them again and embarrassed me trying to launch a community site that was taking off. I do look forward to the enhancement. thank you!

@valadas valadas modified the milestones: 9.4.2, 9.4.3 Nov 5, 2019
@valadas valadas modified the milestones: 9.4.3, 9.5.0 Nov 21, 2019
@valadas valadas modified the milestones: 9.5.0, 9.5.1 Jan 30, 2020
@valadas valadas modified the milestones: 9.5.1, 9.6.0 Mar 18, 2020
@valadas valadas modified the milestones: 9.6.0, 9.6.1 Apr 14, 2020
@valadas valadas modified the milestones: 9.6.1, 9.6.2 May 7, 2020
@valadas
Copy link
Contributor

valadas commented Jul 28, 2020

OAuth 3 is in progress unless someone has other news, I am closing this issue for now, if news change, feel free to comment and I will re-open

@valadas valadas closed this as completed Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants