• Resolved Ratch

    (@tipboxrp)


    Hey Davis,

    Great plugin and development for the Rainbow WP plugin.

    Would you be able to add documentation to understand what Infura ID is needed, if there is a shortcode or a trigger to be added to a button to have login on any page, etc.

    Happy to help with the development to take further but need to understand its process a little more. Especially as we are dealing with Wallet Security, and Account integrity.

    Thanks.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Davis Shaver

    (@davisshaver)

    Hi @tipboxrp! Glad to help answer these questions. I will add them to the readme but I wanted to answer first and make sure I answered all your questions.

    Infura API keys were previously called project IDs, so I will update the label in settings to make it more clear that we need an Infura API key here. Without an Infura API key, token-gating and ENS integrations will not work properly.

    There is not a shortcode, but there is a block for login. With the plugin installed, you will have access to a RainbowKit Login block which can be customized similar to the button block.

    Please let me know if this answers your questions and what other questions or ideas/feedback you have. It would be great to hear your thoughts!

    Thread Starter Ratch

    (@tipboxrp)

    Perfect. That little bit of info helped.

    In regards to the shortcode, you can ask ChatGPT to create the shortcode function for you and then implement as part of the plugin. This offers a much greater feature as can be used as a header trigger login popup.

    Thread Starter Ratch

    (@tipboxrp)

    Also, trying to get the login button to work on an elementor page. ??

    Plugin Author Davis Shaver

    (@davisshaver)

    Hi @tipboxrp – I’m not opposed to adding a shortcode, but it would require additional development, and I think the block should be able to work for your purposes.

    Would you be able to describe your use case for the header trigger login popup? As far as I know, Elementor is compatible with the block editor (Gutenberg), so you should be able to use the RainbowKit Login block already. If you would prefer following up via email, that’s fine with me – my email address is [email protected]. Maybe you can set me up with an author account so I can take a look at your setup and advise on how to use the block on your site.

    Thread Starter Ratch

    (@tipboxrp)

    I will try and figure out how to add the block to a elementor based page template. I’ve tried a few ways but didn’t work.

    Will keep trying.

    Thread Starter Ratch

    (@tipboxrp)

    Hey @davisshaver, just wanted to give you an update which could help others using the plugin, from my experiences and messing around with the code and customisation.

    To use the block (Login button) on Elementor or Divi page builders, you can use a plugin called: Reusable Blocks Extended. This will allow you to create a custom block with shortcode that you can drop in anywhere on your site.

    You can also create a class for this individual shortcode to then customise styling, spacing etc along with the button.

    it’s totally free to use and has no errors or issues. All up to date as of February 2023.

    Another tip:

    Autoptimize, WP Fastest Cache and WP Rocket really effects the functions of the plugin.

    You can use them but the images for the wallets and the triggers no longer work if you minify anything. So avoid these, or alternatively customise the plugin so it’s excluded from cache/minification.

    I tried with Autoptimize but there was absolutely no way of if being active and the Rainbow wallet popup working properly. I tried many custom codes.

    Sole Login using Rainbow Wallet ( no email or password needed, just web).

    Add a function that redirects wp-admin/wp-login to a custom login page.

    // Disable wp login
    function custom_login_page() {
    $new_login_page_url = home_url( '/**ADD YOUR PAGE SLUG HERE' ); // new login page
    global $pagenow;
    if( $pagenow == "wp-login.php" && $_SERVER['REQUEST_METHOD'] == 'GET') {
    wp_redirect($new_login_page_url);
    exit;
    }
    }
    if(!is_user_logged_in()){
    add_action('init','custom_login_page');
    }



    Anyway, just my experiences and update on how to use the button as a shortcode.

    Have a great day and hope this info helped.


    Plugin Author Davis Shaver

    (@davisshaver)

    Hi @tipboxrp! Thanks so much for these notes. I apologize that it took me a few days to get back to you.

    I will look into compatibility with caching plugins. I have an idea of how I can provide a compatibility option for caching plugins. Because the plugin relies on register_block_type() for enqueuing the required CSS & JS assets, I think there could be issues with the shortcode workaround that you’ve found – essentially the block code might get evaluated too late for the assets to be enqueued. So I can look into adding a compatibility mode option for caching plugins where the CSS & JS gets added to every page.

    Would you mind checking one thing for me @tipboxrp – Do you see issues with caching plugins on the main wp-login.php login page? If my theory is correct, you should not see issues with caching on this page, only with the login block.

    Thanks also for your tip about the custom login page. I originally built the wp-login.php integration with the goal of having web3 login and password login both on the same page. Do you think it’d be useful to have an option to disable email and password login if you’re using this plugin? I was hesitant to add this originally because I was worried about site administrators locking themselves out. Maybe if we add the option to disable email and password login, we could also generate a secret login URL. Something like yoursite.com/wp-login.php?wp_rainbow_secret_login_token=L4JRGJ6F38 where L4JRGJ6F38 is a randomly generated token stored in the database. Then the site admin could save this URL so they can access the site using email and password if needed.

    Thanks again for using the plugin and sharing your thoughts/tips!

    Thread Starter Ratch

    (@tipboxrp)

    Yeah that login idea is great.

    I don’t have a wp-login page anymore, its completely customised to a specific page. Used the functions and permanent redirects (safely).

    I’ve completely disabled admin logins and use server end if any issues to enable, i think more experienced devs/site owners will also know this.

    More on the security side of it all, inc disabling wp access for anyone bar an admin. Could even go one further and require multisig login for admins lol but thats pushing it.

    Reason for my only wallet login requirement was for just that, data protection on emails, password security etc while only requiring a sig from the user for registration/login.

    GDPR and all that too.

    • This reply was modified 2 years ago by Ratch.
    Plugin Author Davis Shaver

    (@davisshaver)

    @tipboxrp really interesting idea! when you say multisig login, do you mean using a Gnosis Safe or something like that?

    I have added the login idea to my Github issues list, I hope to tackle it sometime in the next few months. https://github.com/davisshaver/wp-rainbow/issues/47

    Also here’s the issue I made for the caching problem. https://github.com/davisshaver/wp-rainbow/issues/48

    I’m going to mark this issue as resolved for now but feel free to open another one if you see anything else to discuss. Thanks again for the feedback!

    Thread Starter Ratch

    (@tipboxrp)

    Amazing. Thank you and appreciate you taking my feedback/questions.

    Looking forward to potential updates ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘More information’ is closed to new replies.