IdentityServer4 icon indicating copy to clipboard operation
IdentityServer4 copied to clipboard

How can i extend login with additional informations?

Open henriqueprj opened this issue 10 years ago • 12 comments

My user need to feed some additional informations (his location) after login has already be done with success. But, in idsrv4 i dont found a point to make this extensions.

There is a way where i can made such thing? In idsrv3 we have partial login do such things.

Any thoughts?

henriqueprj avatar Jan 20 '16 20:01 henriqueprj

Partial logins are gone because now you are 100% responsible for the UI. You use the various Interaction classes or the action result classes to redirect back into IdentityServer. See the sample host project to get started. Also, details are subject to change :)

brockallen avatar Jan 21 '16 01:01 brockallen

Ok. Thank you.

henriqueprj avatar Jan 22 '16 13:01 henriqueprj

Is this the sample you mentioned @brockallen?

akamud avatar May 24 '16 14:05 akamud

Is there any more sample code on this? I am planning to port to IdSrv4 but the partial login is gone and I need some hint how to now securely implement that functionality.

rh78 avatar Feb 03 '17 07:02 rh78

Just look at our sample UI - and it will be obvious

https://github.com/IdentityServer/IdentityServer4.Quickstart.UI

leastprivilege avatar Feb 03 '17 07:02 leastprivilege

@leastprivilege would you say this approach suggested on stackoverflow is suitable?

http://stackoverflow.com/questions/40609585/how-to-do-multiple-step-login-in-identityserver4

He is using a cookie to pass information between steps... I'm just not sure if using the SignInAsync and AuthenticateAsync is appropriate.

pierslawson avatar Feb 24 '17 16:02 pierslawson

Looks reasonable


Dominick Baier

On 24 February 2017 at 17:53:40, Piers Lawson ([email protected]) wrote:

@leastprivilege https://github.com/leastprivilege would you say this approach suggested on stackoverflow is suitable?

http://stackoverflow.com/questions/40609585/how-to-do-multiple-step-login-in-identityserver4

He is using a cookie to pass information between steps... I'm just not sure if using the SignInAsync and AuthenticateAsync is appropriate.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/IdentityServer/IdentityServer4/issues/13#issuecomment-282342574, or mute the thread https://github.com/notifications/unsubscribe-auth/ABYv-xM6cpjP_sEilCSgt6vEQR1rco9sks5rfwsUgaJpZM4HI85V .

leastprivilege avatar Feb 25 '17 21:02 leastprivilege

As a result, I did it the same. Actually it is partial login coded by yourself as the partial login Cookie was no different. If you want I can provide sample code that you can reuse.

rh78 avatar Feb 26 '17 06:02 rh78

@rh78 That would be good to see. Thank you.

pierslawson avatar Feb 26 '17 11:02 pierslawson

@rh78 @pierslawson share the sample code perchance?

c-luu avatar Feb 19 '19 16:02 c-luu

@rh78 sorry I have no access to that code anymore. But afairemember you just authorize not using the "full auth cookie" but define a second one which just grants access to a part of your application, not every location. Once all information is present (the information entry will be protected by the partial cookie) you sign in the user using the "full auth cookie".

Also you can check out my framework projects here, maybe you can use some code (it contains full IdSrv4 implementation of UI on ASP.NET 2.2.1, with multi tenant features, controllers, setup, GDPR support, tracking, etc. but it's part of a larger, very opinionated project (HCore) that I use for my own software as a base foundation so it might be hard to understand - however maybe you can use one or another code segment):

https://github.com/rh78/HCore/tree/master/HCore-Identity https://github.com/rh78/HCore/tree/master/HCore-Identity-PagesUI-Classes https://github.com/rh78/HCore/tree/master/HCore-Identity-PagesUI-Views

rh78 avatar Feb 19 '19 19:02 rh78

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 11 '20 20:01 lock[bot]