Base solution for your next web application
Open Closed

Open "My settings" when user login for the first time (Aspnet Core + Angular 6) #6083


User avatar
0
larsfk created

Hi! :)

Is there a easy way to have the "My settings" modal open when users logs in for the first time? We use OpenId Connect and we dont get a name or email from the Id-provider so we need the user to add it by them selfs.

Thanks for all help!


7 Answer(s)
  • User Avatar
    1
    hitaspdotnet created

    Hi. If you are using angular version then you can create a component in app module. Get the userId from abp.session.userId and check it for required property and trigger mySettingsModal.show()

  • User Avatar
    0
    larsfk created

    Thank you for responding!

    But I dont quite find the place where to put this in the "login"-flow. Any ideas? :)

  • User Avatar
    0
    hitaspdotnet created

    I'm a ZERO customer, not a member of Support Team. So, take care :)) If I want do this in my app, I put this to account module as new component update-mySettings.component with own router path. Like redirecting to resetPassword when a user should Reset Password after first login. I recommended you to leave mySettings modal and create it as new form. You can extend processAuthenticateResult in login.service.ts and host.

  • User Avatar
    0
    larsfk created

    Thanks alot for that, I will look into it :)

  • User Avatar
    0
    larsfk created

    Any idea how to call "show()" in "MySettingsModalComponent" from another component? Or use "HeaderComponent" to show the "MySettingsModalComponent" ?

  • User Avatar
    1
    ismcagdas created
    Support Team

    Hi @larsfk

    It seems like you want to force users to fill their profile info if the profile information is missing. In order to open my settings modal, you can check those information in app-session.service.ts using the then handler of _sessionService.getCurrentLoginInformations() and redirect user to a new route to fill profile information.

  • User Avatar
    1
    larsfk created

    Thanks a lot for the help!

    I added a new attribute to ExternalAuthenticateResultModel to see if its a new user or not. And if its a new user I will redirect (in login-service.ts) the user to a new modal component with the info that I want to user to produce :)