• Resolved jcarlosd

    (@jcarlosd)


    First of all, thanks for this extraordinary plugin, working as a charm.
    I am trying to extend the functionality in the following terms:
    – I want a site protected to all visitors (I just did it with ‘Members’ plugin)
    – But I need that our company users can enter to see the content, by checking they belong to our list of user emails.
    My plan is to develop an API that instead of checking the existence of the WordPress user email, communicates with the API, receiving a yes or not in the list, and then sending the token to that user email for login (as your plugin)
    Could you please let me know whether can I override the standard check against WordPress users table by sending my API a request (with the answer of not in the list or go ahead)?

Viewing 1 replies (of 1 total)
  • Plugin Author Mustafa Uysal

    (@m_uysl)

    Hi @jcarlosd,

    Magic Login’s core flow is built around WordPress users, so by default it checks whether the email belongs to an existing WP user before it will generate/send a login token. There isn’t a built-in setting to swap that check with an external API call.

    That said, what you want is doable via a small customization: you can hook into the email validation / user resolution step and run your API check there. If your API says “allowed”, you can either:

    * Auto-provision a WP user (recommended approach): create the user on the fly (optionally assign a specific role), then let Magic Login continue normally and send the token.
    * Block the request if your API says “not allowed”.

    This keeps everything compatible with WordPress permissions and works well with plugins like Members, since access is ultimately controlled via WP roles/capabilities.

    In Magic Login PRO, the (auto) registration feature follows a very similar flow https://handyplugins.co/docs/magic-login-registration/ and it’s quite easy to customize. I can’t provide PRO support here, but feel free to email support[at]handyplugins.co if you have any questions.

    Cheers,

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.