Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Saied 349 posts 674 karma points
    Sep 27, 2015 @ 01:46
    Saied
    0

    Creating members in Umbraco based on another systems hash and salt mechanism?

    Hello,

    I am using an external ecommerce system where users can either checkout as guest or login. What I want to happen is when the user creates an account on the other system, I want to automatically create them as a member in Umbraco.

    I can pick a wide variety of hashing algorithms on the other system. A scenario would be something like:

    User is created on ecommerce system. User is created in Umbraco

    They should be able to login to Umbraco and the ecommerce system with the username and password they created.

    Has anyone ever done this before? How would I go about doing it?

    The other way will work too, such as if a user is created in Umbraco first, I will create them in the ecommerce system, but that way is a bit easier than the reverse?

  • Neil Hodges 338 posts 987 karma points
    Sep 27, 2015 @ 15:33
    Neil Hodges
    0

    Hi

    If you have access to the ecommerce system you could upon creating a user there, post the data to a hidden umbraco page?

    That page would consume the posted data and in razor code or pass the data to a SurfaceController where you can insert the user into Umbraco.

    If that makes sense?

    Kind Regards Neil.

  • Saied 349 posts 674 karma points
    Sep 28, 2015 @ 00:42
    Saied
    0

    Hello,

    The problem is not putting the user in umbraco. I am trying to figure out how to relate the the two:

    I set the password algorithm in Umbraco to SHA256 and in the ecommerce system, it is set to a SHA256 with a 48 bit salt suffixed.

    I don't see anywhere in the Umbraco db where the salt is stored.

  • Neil Hodges 338 posts 987 karma points
    Sep 28, 2015 @ 08:33
    Neil Hodges
    0

    Hi

    Sorry not sure why you need the password salt?

    If you need to relate the 2 members just add another field to each member sign up call it 'RelationId', the Umbraco one would have a field to populate the Id of the member in the ecommerce site and vice versa.

    That way you have the Id of both members respectively in each environment to relate them?

    Would that not work? That way you don't need to worry about what encryption each password used.

    Kind Regards Neil.

  • Saied 349 posts 674 karma points
    Sep 29, 2015 @ 06:06
    Saied
    0

    Hi Neil,

    If the user is created in Umbraco first, then the encryption does not matter, but if they are created in Foxy Cart first, then it does have to match because I I want to take the hashed password from Foxy Cart and insert it into the Umbraco password field for members. I tried using Foxy Cart's SHA256 with a 48 bit salted suffix and setting the algorithm type in Umbraco's web.config to SHA256 and then copying Foxy Cart's generated password for that user into Umbraco, but I had no luck.

Please Sign in or register to post replies

Write your reply to:

Draft