Forum Replies Created

Viewing 15 replies - 1 through 15 (of 38 total)
  • Thread Starter mmki

    (@mmki)

    Hi @identitydan,
    does it work for connections with Disable Sign Ups option turned on?

    Thread Starter mmki

    (@mmki)

    Hi Josh. Thank you for the explanation, it was very helpful. I didn’t realize that passwords weren’t migrated with other data.

    Thread Starter mmki

    (@mmki)

    In Auth0 logs I have:

    Type
    Failed Login (wrong password)
    Description
    Wrong email or password

    .

    The same is on ULP form.
    When I try the login script I get the right profile, so there must be some error/misconfiguration (?) elsewhere.

    Thread Starter mmki

    (@mmki)

    Hi,
    I have problem with migrating my users. Due to conferences season I couldn’t do it earlier.

    I have to update my WP from 3.10 to 3.11.1 and change my users user_id’s from something like auth0|123 to auth0|accounts-migration|123

    I have custom database which is my WP database.

    I’m testing the migration process. I do the following steps:

    Prerequirements:

    • I have WP instance similar to my production environment.
    • I have connection for testing purposes created in Auth0 dashboard and configured to use my wordpress database as a custom database.
    • I install Auth0 3.10.
    • I create some new users in my wordpress. I perform a login with theese acccounts to connect them to Auth0 auth0.

    Then I use Auth0’s import/Export Extension. I export all the users with all their attributes that i see in RAW JSON view.
    I create new connection in Auth0 and configure it like the old one except one line on login and get user scripts.

    I change:
    user_id: wpUser.data.ID,
    to:
    user_id: configuration.userNamespace + '|' + wpUser.data.ID,

    I also add the configuration:

    • set the correct migrationToken
    • set userNamespace to accounts-migration
    • set correct endpointUrl

    I adjust previously exported json file:

    • Add brackets [] at the beginning and at the end.
    • Add semicolons , at the end of each line.
    • Change User IDs from something like auth0|123 to accounts-migration|123 and from 123 to accounts-migration|123
    • change connection data
    1. I turn the new connection on and the old connection off for my application.
    2. I import data to my new connection.
    3. I execute some SQL queries to change wp_auth0_id and wp_auth0_obj in wp_usermeta table accordingly.
    4. I change connection in WP > Auth0 > Settings > Features > Auto Login Method to my new connection.
    5. I test my new connection scripts in Auth0 – everything is fine.
    6. I Upgrade WP Login by Auth0 plugin to 3.11.1

    The problem is that my old accounts cannot log in. I can go to wp as an admin and change their passwords and everything is fine.
    I can also add new accounts and successfully connect them to auth0.

    The problem is that I need to migrate my old users with their metadata and I don’t want to tell users that they have to change their passwords.
    Is there something I’m missing? What is wrong that users can’t use their old passwords?

    My old user – RAW JSON:

    
    {
        "email": "[email protected]",
        "email_verified": true,
        "nickname": "f3",
        "name": "[email protected]",
        "picture": "https://s.gravatar.com/avatar/63ffa3fc3c44486161ee65306faca814?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Ff3.png",
        "user_metadata": {},
        "created_at": "2019-10-04T13:06:27.462Z",
        "updated_at": "2019-10-04T13:06:27.462Z",
        "identities": [
            {
                "provider": "auth0",
                "connection": "ACCOUNTS-DEVELOPMENT",
                "isSocial": false,
                "user_id": "5009"
            }
        ],
        "user_id": "auth0|5009",
        "blocked_for": [],
        "guardian_authenticators": []
    }
    

    My migrated user – RAW JSON

    
    {
        "email": "[email protected]",
        "email_verified": true,
        "nickname": "f3",
        "name": "[email protected]",
        "picture": "https://s.gravatar.com/avatar/63ffa3fc3c44486161ee65306faca814?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Ff3.png",
        "user_metadata": {},
        "created_at": "2019-10-04T12:51:54.404Z",
        "updated_at": "2019-10-04T12:51:54.404Z",
        "identities": [
            {
                "provider": "auth0",
                "connection": "ACCOUNTS-MIGRATION",
                "isSocial": false,
                "user_id": "accounts-migration|5009"
            }
        ],
        "user_id": "auth0|accounts-migration|5009",
        "blocked_for": [],
        "guardian_authenticators": []
    }
    

    wp_auth0_id new:

    
    auth0|accounts-migration|5009
    

    wp_auth0_obj new:

    
    {"created_at":"2019-10-01T11:27:09.680Z","email":"[email protected]","email_verified":true,"identities":[{"user_id":"accounts-migration|5009","provider":"auth0","connection":"ACCOUNTS-MIGRATION","isSocial":false}],"name":"[email protected]","nickname":"f3","picture":"https:\/\/s.gravatar.com\/avatar\/63ffa3fc3c44486161ee65306faca814?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Ff3.png","updated_at":"2019-10-04T08:21:27.669Z","user_id":"auth0|accounts-migration|5009","last_ip":"94.246.128.25","last_login":"2019-10-04T08:21:27.669Z","logins_count":2,"sub":"auth0|accounts-migration|5009"}
    
    • This reply was modified 6 years, 7 months ago by mmki.
    • This reply was modified 6 years, 7 months ago by mmki.
    • This reply was modified 6 years, 7 months ago by mmki.
    Thread Starter mmki

    (@mmki)

    Thanks for the informations.

    I’ll be fixing the plugin to avoid this issue

    That’s great to hear.

    Will someone fix the users list at Auth0 dasboard too?

    Thread Starter mmki

    (@mmki)

    This is for any user.
    This happens for a WP that have set User Migration Endpoints all the time and rarely for WP without migration.

    On both installations(with and without Migration/both are updated to the new version of the plugin ) I do not see auth0_transient_email_update only _new_email.

    Now I do not have this errors in Auth0 dashboard logs only in Aut0 WP Logs section: WP_Auth0_Api_Change_Email::call 400 Error returned - DB Get user Custom script: The user 2626 already exists. Verify if the user has changed the email. New email: [email protected] - Old email: [email protected] [auth0_idp_error]

    Thread Starter mmki

    (@mmki)

    I’ve uploaded the files from ZIP from GitHub.
    I’ve searched for the new email before the proces, then after I changed email as a user but before clicking confirmation link from the email. In both cases i got “The profile is: undefined” from get_user script.
    I’ve checked WP user_meta before I clicked the email link and found entry with meta_key _new_email which was correctly set to ‘[email protected]’.
    Then I’ve clicked the email link but i couldn’t log in to Auth0 with the new email, only the old was working.

    I can go to Auth0 dashboard and successfully change the email to [email protected].

    • This reply was modified 7 years, 1 month ago by mmki.
    Thread Starter mmki

    (@mmki)

    I’ve gave it a try but for me nothing changed.
    I’ve checked it twice if the files were correctly uploaded.
    I’ve checked both email addresses in wp users list and by Auth0 API ‘s get_user_by_email.
    The [email protected] exists, the [email protected] doesn’t.
    I still get the same error both in Auth0 dashboard and in wp Auth0 logs.

    Thread Starter mmki

    (@mmki)

    I’m not seeing that behavior on my end:

    Check the response from the API above for [email protected].

    I would expect to get both [[email protected] & CONNECTION_1] and [[email protected] & CONNECTION_2]. Am I right or maybe that is correct behavior? I get:

    identities.connection:"CONNECTION_1"
    [foo@bar & CONNECTION_2]

    email:"[email protected]"
    [foo@bar & CONNECTION_2]

    I would expect [foo@bar & CONNECTION_1] for this one:

    identities.connection:"CONNECTION_1" AND email:"foo@bar"
    [foo@bar & CONNECTION_2]

    • This reply was modified 7 years, 1 month ago by mmki.
    Thread Starter mmki

    (@mmki)

    Are you sure you’re looking in the right place? It’s pretty unlikely that the core Auth0 product is handling this incorrectly without a massive flood of support tickets. I only say that because I have not seen this behavior while testing. If you can give me reproduction steps here, I’d be happy to take a look.

    After I wrote this message I found that this was only wrong display on Users list (https://manage.auth0.com/ > Users&Roles > Users)

    I have [email protected] in CONNECTION_1 and CONNECTION_2.
    Users list shows accounts ordered by Latest login.
    I’ve turn on implict login flow and log in to my site. It was configured in such a way that I expected foo@bar with CONNECTION_1.
    I’ve checked latest login on users list and I saw foo@bar from CONNECTION_2 (wrong).
    I’ve checked logs (https://manage.auth0.com/ > Logs) and I saw foo@bar from CONNECTION_1 (correct).

    According to the logs it is only display error on users list.

    Thread Starter mmki

    (@mmki)

    I’m not sure I totally understand. Can you give me a little more detail here?

    I have these two accounts, that were mixed in wordpress:

    [email protected]

    
    [
      {
        "email": "[email protected]",
        "email_verified": true,
        "nickname": "spam",
        "name": "[email protected]",
        "user_id": "auth0|2599",
        ...
        "identities": [
          {
            "user_id": "2599",
            "provider": "auth0",
            "connection": "CONNECTION_1",
            "isSocial": false
          }
        ],
        ...
        "logins_count": 6
      }
    ]
    

    [email protected]

    
    [
      {
        "email": "[email protected]",
        "email_verified": false,
        "nickname": "foo",
        "name": "[email protected]",
        "user_id": "auth0|2599",
        ...
        "identities": [
          {
            "user_id": "2599",
            "provider": "auth0",
            "connection": "CONNECTION_2",
            "isSocial": false
          },
          {
            "profileData": {
              "email": "[email protected]",
              "email_verified": true,
              "nickname": "foo"
            },
            "user_id": "2611",
            "provider": "auth0",
            "connection": "CONNECTION_1",
            "isSocial": false
          }
        ],
        ...
        "logins_count": 28
      }
    ]
    

    I go to https://manage.auth0.com/ > Users&Roles > Users
    I click on [email protected] but I get [email protected]

    • This reply was modified 7 years, 1 month ago by mmki.
    Thread Starter mmki

    (@mmki)

    Two more things
    1) I’ve turned on Implict Login Flow on a WordPress site that is configured as Auth0 application that allows Auth0’s database connection with database migration. I’ve logged in to that site with an email that is used in two databases connections with migration. With implict login flow I saw the right email in my user’s profile but when i checked on Auth0 dashboard I saw that the latest login was from the second database connection linked to that email but that database connection wasn’t allowed for my application.
    EDITED: I’ve chcecked auth0 dashboard logs too and in logs it states that it was the right account – so only the users list is corrupted.

    2) In Auth0 dashboard if I search by by email I only see an an account once although it is in two databases.

    • This reply was modified 7 years, 1 month ago by mmki.
    Thread Starter mmki

    (@mmki)

    @auth0josh – I’m glad that you are working to solve this problem.

    Please note that this error is affecting Auth0 dashboard too. I’m seeing correct account on the users list but it is linking to wrong identity.

    Thread Starter mmki

    (@mmki)

    It happens for all the users.

    Thread Starter mmki

    (@mmki)

    I would use that one provided in this thread instead of a template from the dashboard (since it’s very specific to this use case).

    I will use that one in the thread. I didn’t know about it, probably I customized this script a long time ago and it wasn’t there yet.

    Can you test with the account linking rule turned off?

    I’ve tested it with the rule turned off but nothing changed.

    Today I opened the computer, then the browser and probably clicked the button to change the email right away. Then I’ve got this error message:
    The link you followed has expired. I’ve clicked ‘Please try again’ message and this time the email has changed, and I’ve changed it a few times. Then I’ve added new account and logged to it with another browser then I’ve checked this new account and that account that I’ve changed with success before and again I’ve received error messages.

    • This reply was modified 7 years, 1 month ago by mmki.
Viewing 15 replies - 1 through 15 (of 38 total)