Issues with SSO and DNN


#1

@adopilot Thanks for your work on the DNN SSO module it was a big help!

I’ve taken adopilot’s code and integrated into my existing DNN controller. I’ve got it half working. When a user is logged in on my main site they can seamlessly access my forum hosted on Digital Ocean. The problem I’m having is that when a user lands on my forum first and tries to sign in I get the following error:

Error updating information, contact site admin

What I’ve noticed is that when I click the sign on button on my discourse site, instead of being presented with a login dialog, my SSO module on my main site is immediately called.

Any ideas on what could be causing this would be appreciated.

Thanks!


#2

I realized that I had allowed anonymous access to my controller function, once I made it require authorization it now challenges for a username and password. It will work with the correct credentials, but now the issue is that the challenge is the default browser challenge, not the discourse login.


(Admir Hodzic) #3

Sory I did not understund You well.
You did broke something else on your DNN instalaion

I do not got it
Can you please add more details ?


(Admir Hodzic) #4

Not for shure .
But I think that DNN have ability to allow users to log in even if their accounts is not active (valid)
Here is how looks like my User Setings on DNN


#5

Stackfish use “None” for the registration type since we have our own custom registration module. I don’t think this is related to the problem I’m having.

What I’ve done is taken your code and placed in entirely in the my DNN controller whereas you create a custom christoc module (which I also used for my custom modules) that you reference from your DNN controller.

If the user starts out from Stackfish and navigates to our forums, everything work as expected. The issue I’m having is that when a user who is not logged into Stackfish lands on our discourse forum and tries to sign in from there. What happens is that as soon as they click on the sign in button in discourse they get the default browser login prompt, not the nice discourse login screen. If they enter the correct credentials, they can log in.

What I want is that when a user tries to log in to our discourse forum, they are presented with the discourse login, not the default browser login.

You can see the issue here by clicking on the Log In button http://forums.stackfish.com/

I hope that helps.
Jimmy


(Admir Hodzic) #6

Same at me, but since I have very small community that is not issue for me.

Maybe we shuld not point SSO to API endpoint, and redesing module to first display some message on form to check is user loged In and from there to do call back redirect to discourse. IF i remember well SSO Will wait for call back up to 10 minutes.
Do you have time for few days to I try that?


(Admir Hodzic) #7

Also, My DNN do rember users and every other landing directly to forum.discourse My users pass throught SSO with out problems


#8

So can a user go directly to your forum and sign in? If yes, are they presented the discourse login screen?