Announcement

Collapse
No announcement yet.

How to redirect to a different URL after a successful login in vB5

Collapse
X
Collapse
First Prev Next Last
 

  • How to redirect to a different URL after a successful login in vB5

    There may be cases where your main site is not a vBulletin site and you have a forum section using vBulletin 5. And there may be instances where you would want to re-use the vB5 login page then after a successful login, redirect to the main site.

    How would you do that? It's easy.

    For example, your main site is http://example.com/ and your vB5 forum is http://example.com/forum/
    1. In your main site, you can reference to the vB5 login page inside an iframe or in its own window using the following URL:
      Code:
      http://example.com/forum/auth/login-form?url=aHR0cDovL2V4YW1wbGUuY29tLw==
      You are passing "url" querystring with a value of Base64 encoded URL which is in our example, http://example.com/
      There are Base64 encoder tools online that you can use to do this. One of them is http://www.motobit.com/util/base64-decoder-encoder.asp.
    2. Once vB5 authentication is successful, it decodes the url querystring value and redirects to that URL.
    Demo:
    Open the link below in Private Mode or Incognito Mode to login to this site (obviously, you need to be a registered user here). Once you successfully logged in, you will be redirected to http://www.vbulletin.com/forum/ and not to this site.

    http://vbmods.rocks/auth/login-form?...9tL2ZvcnVtLw==

    That's it. Enjoy!
    Last edited by glennrocksvb; 10-18-2022, 02:46 PM.

    • glennrocksvb
      #7
      glennrocksvb commented
      Editing a comment
      I see. That's totally unrelated to this blog. Do you want only some modules in the homepage to be visible to guests and then some modules visible to logged in users? If you are using an Ad Module, you can set the visibility of the module to different usergroups.

    • chicoynano
      #8
      chicoynano commented
      Editing a comment
      If that is the idea I have installed this product dragonbyte infopanels / but I do not have options to customize which groups can see it. Is there any other way to do it? Thank you

    • glennrocksvb
      #9
      glennrocksvb commented
      Editing a comment
      Sorry I have no idea. You should ask dbtech about that.

    • chicoynano
      #10
      chicoynano commented
      Editing a comment
      The question was not about that module only was an example anyway thank you for your time, very kind

    • glennrocksvb
      #11
      glennrocksvb commented
      Editing a comment
      Right now, only Ad Modules have the functionality to set visibility via usergroups. I believe there's a JIRA in vBulletin to do the same for all modules.
    You must be logged in to post a comment.

Users Viewing This Page

Collapse

There is 1 user viewing this blog topic.

  • Guest Guest

Latest Posts

Collapse

Working...
X
Searching...Please wait.
An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

Please push the back button and reload the previous window.'
An unexpected error was returned: 'Your submission could not be processed because the token has expired.

Please push the back button and reload the previous window.'
An internal error has occurred and the module cannot be displayed.
There are no results that meet this criteria.
Search Result for "|||"