You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using :confirmable in my user model, in a pure API app with Javascript front-end.
The link in the email refers to the server address and port (in the development situation something like localhost:3000/api/auth/confirmation_token..), whilst we want to be redirected to the front-end (i.e. something like localhost:3001/confirmed).
I think I would rather the confirmation came through the front-end rather than the API. It feels wrong for external actors to access the API directly.
But even if they did, the redirect link address is wrong. Unless a new host is specified, it points to the URI confirmed, and will hit the back-end server instead.
This redirection url is configured in ng-token-auth's "confirmationSuccessUrl", and I'd need to get the host address/port of the front-end server; I could presumably do this via a function, but the auth configuration needs to be a static string.
How do other people use this feature? Does it require some custom code to pass the token through front-end to back-end? Any hints?
The text was updated successfully, but these errors were encountered:
I'm using
:confirmable
in my user model, in a pure API app with Javascript front-end.The link in the email refers to the server address and port (in the development situation something like
localhost:3000/api/auth/confirmation_token
..), whilst we want to be redirected to the front-end (i.e. something likelocalhost:3001/confirmed
).I think I would rather the confirmation came through the front-end rather than the API. It feels wrong for external actors to access the API directly.
But even if they did, the redirect link address is wrong. Unless a new host is specified, it points to the URI
confirmed
, and will hit the back-end server instead.This redirection url is configured in
ng-token-auth
's "confirmationSuccessUrl", and I'd need to get the host address/port of the front-end server; I could presumably do this via a function, but the auth configuration needs to be a static string.How do other people use this feature? Does it require some custom code to pass the token through front-end to back-end? Any hints?
The text was updated successfully, but these errors were encountered: