-
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
IAuthenticationCallbackProvider method names #151
Labels
Comments
PureKrome
added a commit
to PureKrome/SimpleAuthentication
that referenced
this issue
Oct 10, 2014
- Referencing the NancyFX MyGet library for the latest -pre which includes updates to the INancyModule interface. - Added a NuGet.config file to reference the MyGet api. - Removed the ICache (fixes SimpleAuthentication#145). - Removed the HttpClient code. Now uses the WorldDomination.HttpClient.Helpers package instead. - Provider key is not required to be sent to the Provider. The session now stores this. - IAuthenticationProviderCallback returns dynamic (closes SimpleAuthentication#155). - IAuthenticationProviderCallback methods are not async (closes SimpleAuthentication#151).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A website needs to implement this interface
IAuthenticationCallbackProvider
. This allows the developer to handle the callback from the Provider (eg. Google).eg. Once the user auth's against Google, we come back to our website .. and then what?
i) do we create a new user?
ii) update the details on an existing user?
iii) do we need to ask for more credentials?
iv) did the user reject the permissions request (ie. no Google, don't give out my email).
Ok - so the developer now needs to handle this. Fine.
So i've exposed to interfaces which I believe handle most scenarios.
a)
Process
b)
OnRedirectToAuthenticationProviderError
Now, with the process .. i'm assuming that MOST of the time the code will be grabbing the user info from the provider and then storing that in the db. Because of this database-assumption I'm wondering
Process
should be renamed toProcessAsync
and it returns aTask<dynamic>
? Assumption here is a db requirement is async. The con to this is that I'm now making assumptions of the developers and it's very possible that they will NOT do any db/I-O bound stuff.OnRedirectToAuthenticationProviderError
this is gerenally just a redirect to their own error page. But there is no reason why this method also can't do something I-O bound, like send a logging error to LogEntries or RayGun, etc.If I leave them as not
async
, then how would a person do something async in one of those methods if they needed to storea user record asyncly, for example?The text was updated successfully, but these errors were encountered: