Yes, you can set any page on your WordPress site as the value for redirect_to. You probably do not have to URL encode the redirect_to parameter. Something like this should work:
so by adding “my-wordpress-page” as the redirect it will redirect user to the page he/she was on?
Or did you mean to replace “my-wordpress-page” with the page I want the user redirected to?
You can use the [discourse_sso_client] shortcode on any WordPress page to create a ‘Login with Discourse’ link that will redirect users back to the page that the shortcode was placed on.
There is some documentation on the plugin’s SSO Client tab for the shortcode.
There was a bug in the most recent versions of the plugin that was causing the shortcode to display the ‘Link your account with Discourse’ text for logged in users who had already linked their account. Update to WP Discourse version 1.6.0 to get the fix.
Ehi, penso che sarebbe un’aggiunta semplice ma utile alla funzionalità del plugin se potessi implementare anche questo: Modulo di registrazione/link autonomo?. Sto usando Discourse come master SSO e sarebbe molto utile fornire sia una pagina di accesso per gli utenti esistenti che un link di registrazione per i nuovi utenti, con reindirizzamento alla pagina originale da cui sono arrivati.
Ehi, al momento non abbiamo piani per implementare nulla qui oltre al parametro redirect_to.
Riuscire a “reindirizzare qualcuno alla stessa pagina in cui si trovava” è un po’ più complicato di quanto sembri. Ci sono molti casi limite. Se aggiungessimo questa funzione come funzionalità principale, ci impegnerebbe di fatto a supportare tutti quei casi limite Come puoi immaginare, ci sono molti modi diversi per configurare un sito WordPress.
Ti ho già dato un piccolo suggerimento su questo, ma per aiutarti ulteriormente, tu o il tuo sviluppatore dovrete fare qualcosa di simile, ovvero estendere lo shortcode esistente per impostare automaticamente route_to sull’URL corrente del sito. Potrete poi gestire i casi limite specifici per il vostro sito.