Loading README.md +21 −7 Original line number Diff line number Diff line Loading @@ -15,8 +15,10 @@ subscribe / unsubscribe functionality in a decoupled environment, for example, a React frontend. There are multiple issues with that: * The Core Rest API Endpoint does not trigger a confirmation mail if needed * You need the permission 'administer simplenews subscriptions' to use the rest endpoint * Subscribe / unsubscribe URL which is sent in the Mails are always pointing to the D8 installation * You need the permission 'administer simplenews subscriptions' to use the rest endpoint * Subscribe / unsubscribe URL which is sent in the Mails are always pointing to the D8 installation This module tries to solve these issues. Loading @@ -39,8 +41,8 @@ INSTALLATION CONFIGURATION ------------- * You need to set the base bath to your decoupled environment (this will be used to replace the D8 base URL in the subscribe / unsubscribe URLs) * You need to set the base bath to your decoupled environment (this will be used to replace the D8 base URL in the subscribe / unsubscribe URLs) - Add this to your `settings.php`: Loading Loading @@ -81,13 +83,19 @@ CONFIGURATION - Route component of the subscribe / unsubscribe confirmation page ``` <Route exact path="/newsletter/confirm/:action/:sid/:newsletter_id/:timestamp/:hash" component={NewsletterConfirm} /> <Route exact path="/newsletter/confirm/:action/:sid/:newsletter_id/:timestamp/:hash" component={NewsletterConfirm} /> ``` - Route component of the combined subscribe / unsubscribe confirmation page ``` <Route exact path="/newsletter/confirm/combined/:sid/:timestamp/:hash" component={NewsletterCombinedConfirm} /> <Route exact path="/newsletter/confirm/combined/:sid/:timestamp/:hash" component={NewsletterCombinedConfirm} /> ``` ``` Loading @@ -104,7 +112,13 @@ class NewsletterConfirm extends Component { }; componentDidMount() { const { action, sid, newsletter_id, timestamp, hash } = this.props.match.params; const { action, sid, newsletter_id, timestamp, hash } = this.props.match.params; axios.get(`${yourBackendUrl}/simplenews-decoupled/confirm/${action}/${sid}/${newsletter_id}/${timestamp}/${hash}`) .then(response => { Loading Loading
README.md +21 −7 Original line number Diff line number Diff line Loading @@ -15,8 +15,10 @@ subscribe / unsubscribe functionality in a decoupled environment, for example, a React frontend. There are multiple issues with that: * The Core Rest API Endpoint does not trigger a confirmation mail if needed * You need the permission 'administer simplenews subscriptions' to use the rest endpoint * Subscribe / unsubscribe URL which is sent in the Mails are always pointing to the D8 installation * You need the permission 'administer simplenews subscriptions' to use the rest endpoint * Subscribe / unsubscribe URL which is sent in the Mails are always pointing to the D8 installation This module tries to solve these issues. Loading @@ -39,8 +41,8 @@ INSTALLATION CONFIGURATION ------------- * You need to set the base bath to your decoupled environment (this will be used to replace the D8 base URL in the subscribe / unsubscribe URLs) * You need to set the base bath to your decoupled environment (this will be used to replace the D8 base URL in the subscribe / unsubscribe URLs) - Add this to your `settings.php`: Loading Loading @@ -81,13 +83,19 @@ CONFIGURATION - Route component of the subscribe / unsubscribe confirmation page ``` <Route exact path="/newsletter/confirm/:action/:sid/:newsletter_id/:timestamp/:hash" component={NewsletterConfirm} /> <Route exact path="/newsletter/confirm/:action/:sid/:newsletter_id/:timestamp/:hash" component={NewsletterConfirm} /> ``` - Route component of the combined subscribe / unsubscribe confirmation page ``` <Route exact path="/newsletter/confirm/combined/:sid/:timestamp/:hash" component={NewsletterCombinedConfirm} /> <Route exact path="/newsletter/confirm/combined/:sid/:timestamp/:hash" component={NewsletterCombinedConfirm} /> ``` ``` Loading @@ -104,7 +112,13 @@ class NewsletterConfirm extends Component { }; componentDidMount() { const { action, sid, newsletter_id, timestamp, hash } = this.props.match.params; const { action, sid, newsletter_id, timestamp, hash } = this.props.match.params; axios.get(`${yourBackendUrl}/simplenews-decoupled/confirm/${action}/${sid}/${newsletter_id}/${timestamp}/${hash}`) .then(response => { Loading