-
Notifications
You must be signed in to change notification settings - Fork 82
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
SimpleAuthentication stopped working when I added forms Auth, any ideas? #203
Comments
Ok - so there's 2 questions here.. 1 - Does Forms Auth work with SA? It should... So .. lets me try asking a Q... with your REVERT, did that include dropping back to your previous version of SA? v |
@PureKrome 1) Forms authentication works with the latest changes (1 commit, which includes the changes I mention in the issue). But then Google OAuth is not working.
|
@phillip-haydon I need a rest first before I can review the SO thread properly. Maybe there is some change I need to make to move from SA 0.3.14 to 0.6.0, and that thread will have it. Thanks for now. |
Here is the precommit authentication configuration, which works fine for Google OAuth using SA 0.3.14. Note that here I am calling FormsAuthentication.Enable from request startup, after the commit I am using the application startup (I'll try calling the FormsAuthentication.Enable from request and application startup to make sure that change wasn't the issue).
|
I thought u said that, after you reverted then the google api was giving you that quoted |
Oops ok that was confusing. I tried to update the issue to clarify the exception (occuring when Google OAuth is used) is what I saw after adding Forms auth. |
I was hoping the exception was a known issue on upgrade. Since its not I should break up the commit to isolate the issue. |
I was able to fix things by going back from 0.6.0 to 0.3.14. The new documentation has a lot of problems (wrong nuget package name, wrong class/namespace for config section, how do I configure google provider in code?) I just couldn't work through it. |
(just to be clear, forms auth and Google OAuth now work for me with 0.3.14) |
Hi, |
|
@PureKrome |
OK @fschwiet and @zahidmadeel I've had a crack at trying to reproduce this error with a sample project. This is the Sample Branch with the code i'm using to try and reproduce your google error. The actual new project is found in Samples/Demo which is what i made to try and repo this. ONCE AGAIN - THIS IS A BRACH, FOUND UNDER MY OWN FORKED REPO. I can't seem to reproduce it. You can download my code (a branch, in my own fork). What I did was the following:
so far so good....
NOTE:
Is there any chance I could get you guys to pull down my branch and run my code and see if it works for you. if so, can you to a mental-diff between my code and your private code (which i cannot see). |
Thanks for putting the project up. I was able to run it and login with Google fine. I made some changes and didn't find the issue, there are more changes I can still try though. |
I had same error on retrieving user info. {
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. Google+ API has not been used in project xxx before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/plus/overview?project=xxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"extendedHelp": "https://console.developers.google.com/apis/api/plus/overview?project=xxx"
}
],
"code": 403,
"message": "Access Not Configured. Google+ API has not been used in project xxx before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/plus/overview?project=xxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
}
} which was a little bit helpful than: After enabling Google+ Api everything was fine. Another remark is that 0.3.14 package is working without Google+ Api enabled (retrieving user info and no exception). I don't think that it is related to forms auth. Thank you. |
I had a similar issue when writing my flask app your issue is with the GoogleProvider constructor
the URi needs to be https://accounts.google.com/o/oauth2/v2/auth . in case it changes again you should populate from https://accounts.google.com/.well-known/openid-configuration this is my workaround
Also you only get your users email if you don't have google+ enabled in your google api dashboard. to get the display name make sure to enable google+. |
Maybe I should ask in StackOverflow, as I haven't really narrowed down the issue. I saw discussion in the issues AuthenticationProviderFactory registration, that may be related.
I've been using Google OAuth with SimpleAuthentication for awhile without problem. I finally went and added forms support. But then Google OAuth doesn't work, I am seeing the below exception. I do not know what the issue is. I later went back and reverted the forms changes to verify google auth works (to verify the google API secret key was still working).
After adding Forms auth, I see an exception:
This is my auth configuration with the change to support Forms auth:
The CryptographyConfiguration is also new, but GoogleOAuth broke before I added that so I don't think its the problem. I am concerned about AuthenticationProviderFactory. Maybe I need to add Forms in there somehow? Maybe something I did with Forms prevernts the googleProvider from being found?
There was a lot of churn in the nuget packages I am using as well, per below:
Sorry I guess I tried to too much in one step, now I don't know where the breakage is coming from.
The text was updated successfully, but these errors were encountered: