Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

How can i extend login with additional informations? #13

Closed
henriqueprj opened this issue Jan 20, 2016 · 12 comments
Closed

How can i extend login with additional informations? #13

henriqueprj opened this issue Jan 20, 2016 · 12 comments
Labels

Comments

@henriqueprj
Copy link

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?

@brockallen
Copy link
Member

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 :)

@henriqueprj
Copy link
Author

Ok. Thank you.

@akamud
Copy link

akamud commented May 24, 2016

Is this the sample you mentioned @brockallen?

@rh78
Copy link

rh78 commented Feb 3, 2017

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.

@leastprivilege
Copy link
Member

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

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

@pierslawson
Copy link

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

https://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.

@leastprivilege
Copy link
Member

leastprivilege commented Feb 25, 2017 via email

@rh78
Copy link

rh78 commented Feb 26, 2017

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.

@pierslawson
Copy link

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

@c-luu
Copy link

c-luu commented Feb 19, 2019

@rh78 @pierslawson share the sample code perchance?

@rh78
Copy link

rh78 commented Feb 19, 2019

@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

@lock
Copy link

lock bot commented Jan 11, 2020

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 lock bot locked as resolved and limited conversation to collaborators Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants