web/satellite: rework signup verify redirect flow
WHAT: people who sign up on US2 are not redirected to verifying page. From now on we have to set verify URL to make redirect happen WHY: user experience Change-Id: I96c51a2c4f9cb6376cbfea639675b32918b58bee
This commit is contained in:
parent
fd095e604f
commit
fcd18ef48a
@ -76,7 +76,7 @@ type Config struct {
|
||||
TermsAndConditionsURL string `help:"url link to terms and conditions page" default:"https://storj.io/storage-sla/"`
|
||||
SegmentIOPublicKey string `help:"used to initialize segment.io at web satellite console" default:""`
|
||||
AccountActivationRedirectURL string `help:"url link for account activation redirect" default:""`
|
||||
VerificationPageURL string `help:"url link to sign up verification page" default:"https://tardigrade.io/verify"`
|
||||
VerificationPageURL string `help:"url link to sign up verification page" devDefault:"" releaseDefault:"https://tardigrade.io/verify"`
|
||||
PartneredSatelliteNames string `help:"names of partnered satellites" default:"US-Central-1,Europe-West-1,Asia-East-1"`
|
||||
GoogleTagManagerID string `help:"id for google tag manager" default:""`
|
||||
GeneralRequestURL string `help:"url link to general request page" default:"https://support.tardigrade.io/hc/en-us/requests/new?ticket_form_id=360000379291"`
|
||||
@ -276,6 +276,7 @@ func (server *Server) appHandler(w http.ResponseWriter, r *http.Request) {
|
||||
header.Set("Referrer-Policy", "same-origin") // Only expose the referring url when navigating around the satellite itself.
|
||||
|
||||
var data struct {
|
||||
ExternalAddress string
|
||||
SatelliteName string
|
||||
SatelliteNodeURL string
|
||||
SegmentIOPublicKey string
|
||||
@ -289,6 +290,7 @@ func (server *Server) appHandler(w http.ResponseWriter, r *http.Request) {
|
||||
GatewayCredentialsRequestURL string
|
||||
}
|
||||
|
||||
data.ExternalAddress = server.config.ExternalAddress
|
||||
data.SatelliteName = server.config.SatelliteName
|
||||
data.SatelliteNodeURL = server.nodeURL.String()
|
||||
data.SegmentIOPublicKey = server.config.SegmentIOPublicKey
|
||||
|
@ -3,6 +3,7 @@
|
||||
<head lang="en">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<meta name="external-address" content="{{ .ExternalAddress }}">
|
||||
<meta name="satellite-name" content="{{ .SatelliteName }}">
|
||||
<meta name="satellite-nodeurl" content="{{ .SatelliteNodeURL }}">
|
||||
<meta name="segment-io" content="{{ .SegmentIOPublicKey }}">
|
||||
|
@ -255,11 +255,12 @@ export default class RegisterArea extends Vue {
|
||||
email: this.$store.getters.user.email,
|
||||
});
|
||||
|
||||
if (this.partneredSatellites.includes(this.satelliteName)) {
|
||||
const verificationPageURL: string = MetaUtils.getMetaContent('verification-page-url');
|
||||
const verificationPageURL: string = MetaUtils.getMetaContent('verification-page-url');
|
||||
if (verificationPageURL) {
|
||||
const externalAddress: string = MetaUtils.getMetaContent('external-address');
|
||||
const url = new URL(verificationPageURL);
|
||||
|
||||
url.searchParams.append('name', this.satelliteName);
|
||||
url.searchParams.append('redirect', externalAddress);
|
||||
|
||||
window.top.location.href = url.href;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user