Replies: 5 comments 6 replies
-
Hi @zagi25, thank you for bringing this up, the use-case should have support in Milo. I think your proposed solution makes sense, we just need to account for multiple implementations, such as the existing Profile Menu and the upcoming Universal Navigation with a brand new Profile Menu. customSignIn: async (defaultSignIn) => {
await myCustomCode();
defaultSignIn();
} In this example, if myCustomCode is retrieving some data which can take let's say 3 seconds, then the user would see a big delay until the sign in is executed. If we only execute async code, there shouldn't be any problem. Example two: customSignIn: () => {
myCustomCode();
myOtherCode();
} Another issue with this code is possible lack of consistency. Visitors might be already used to getting redirected to SUSI for login, but if the default method is not executed or if the visitor is redirected to a different page, we might see some issues. This would also affect global requirements for redirecting logged-in users to a specific page / feature. I would like to understand how you plan to log in the user and if you have plans to execute the default method of |
Beta Was this translation helpful? Give feedback.
-
I'd be very curious on some context of the specific use case you are trying to solve / a related ticket with more context, this would also help brainstorming on the best path to take! |
Beta Was this translation helpful? Give feedback.
-
Hi @narcis-radu and @mokimo thanks for the fast replay. I am sorry for not providing the exact problem that I want to solve. So we want to signin user using My idea was to use
I believe
To be honest I didn't tested this approach, but based on the |
Beta Was this translation helpful? Give feedback.
-
@narcis-radu @mokimo I can also add some background on what we need in the partner portal.
I just had a long discussion with @zagi25
|
Beta Was this translation helpful? Give feedback.
-
@narcis-radu @mokimo any update on this? |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, my team is preparing to migrate our pages to MILO and we came across an issue.
Problem
We are working with user accounts and we have a need for some additional functionality regarding
signIn
andsignOut
of an user. Currently as far as I can tell MILO only supports default logicwindow.adobeIMS.signIn()
andwindow.adobeIMS.signOut()
and there is no way to configure this outside of MILO code. If I am not wrong the only way to set custom functionality for this actions is to replacesignIn/signOut
buttons with our own, but this means that we need to wait for IMS to be loaded and gnav to be rendered so we can access those elements and change them. And adding logic with bunch ofsetInterval()
in our code doesn't look like the best way to do this.Solution
I propose that we add additional properties to the
CONFIG
object (eg.customSignIn
andcustomSignOut
), value of this properties would be functions that will contain custom logic and they will be set as functions that will be called whenclick
event is fired by clickingSignIn/SignOut
buttons/links. In this commit you can see how this would look like commit (I didn't cover all the usages ofwindow.adobeIMS.signIn()/window.adobeIMS.signOut()
) . As you can see this addition will not interfere with the way code works now, and if new properties are not defined it will default to the way it worked before.I would greatly appreciate your input regarding this issue and my proposed solution . If you like it and if you are willing to add this functionality to the MILO core, I would be more than happy to submit the PR for it and if not I am open for some other way to deal with this. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions