fix: forgot password redirect from app

This commit is contained in:
Lakhan Samani
2022-10-24 11:37:42 +05:30
parent e690066652
commit 287b952dad
3 changed files with 22 additions and 19 deletions

View File

@@ -81,22 +81,8 @@ func GetOrganization() map[string]interface{} {
}
// GetForgotPasswordURL to get url for given token and hostname
func GetForgotPasswordURL(token, hostname, redirectURI string) string {
resetPasswordURL := redirectURI
if resetPasswordURL == "" {
resetPasswordURL, err := memorystore.Provider.GetStringStoreEnvVariable(constants.EnvKeyResetPasswordURL)
if err != nil {
return ""
}
if resetPasswordURL == "" {
if err := memorystore.Provider.UpdateEnvVariable(constants.EnvKeyResetPasswordURL, hostname+"/app/reset-password"); err != nil {
return ""
}
}
}
verificationURL := resetPasswordURL + "?token=" + token
func GetForgotPasswordURL(token, redirectURI string) string {
verificationURL := redirectURI + "?token=" + token
return verificationURL
}