Repository: Cloud-CV/EvalAI
Issue: email confirmation page links back to main hosted instance
Root cause: Architectural Constraint

After clicking/processing an email confirmation link, the resultant page links back to the main/cloud instance instead of the localhost/docker instance that is running the page.

1. Sign up as a new user
2. Click the confirmation link
3. The page from `http://localhost:8000/api/auth/email-confirmed/` contains a button to proceed to **login**, but when clicked it goes to the main URL `https://evalai.cloudcv.org/auth/login` instead.

Low priority, but may cause some issue when used locally via docker/source. 

Thanks, @ezavesky for opening this issue. This is just a static page shown to the participants when they confirm their email. Currently, it is being served by the backend server and it needs to be changed to be handled by angular routing. I am increasing the priority of this issue so that we get it resolved really soon. Sorry for the inconvenience.

@deshraj Thanks for the hustle.  These are minor issues, IMO and the availability of the project is still a fantastic open source contribution! I will continue to report issues (if more exist) and hope to give back where I can.

Thanks a lot. We look forward to hearing more about the project. 

I am a newbie in this project. Can I work on this?

Sure @123vivekr. Go ahead. :)

Hi is this issue still open, else can i work on this?


This issue is still open to work :)

@RishabhJain2018 can I work on this ?


Sure @ashish0910 you can work on this!

Is this issue still open can I work on this? @RishabhJain2018 

@ashish0910 Any updates on this?

@namish800 you can also work on it , I am having hard time resolving it . @RishabhJain2018 

Can I work on this?

@anuj-rathore You can work on this. I'm not sure if @namish800 is working on it.

@RishabhJain2018 I tried replicating the issue, for me after clicking on the Login button on [http://localhost:8000/api/auth/email-confirmed/], It took me to the login page!

Seems like it already been fixed!

I have checked it on localhost and also on the original site: [https://evalai.cloudcv.org/auth/login].
It is working as expected, I think we should close this issue.

No, this is not fixed. Currently what happens is that after creating a new user on `localhost` and verifying on `http://localhost:8000/api/auth/email-confirmed/`, the Login button redirects the user to the main hosted instance i.e. `https://evalai.cloudcv.org/auth/login` which should not be the case. It should be redirect to `http://localhost:8888/auth/login`.

Please let me know if something is not clear.

Sorry, I missed the url, taking this issue!

@RishabhJain2018  This is because the URL has been hardcoded [here](https://github.com/Cloud-CV/EvalAI/blob/master/apps/accounts/templates/account/email_confirm.html/#L45).
Can't we fix this by checking the `DEBUG` in settings and passing the url in context accordingly instead of changing it to angular routing?

I was thinking of a hacky solution just hardcode: 
**From:**
'''a href="https://evalai.cloudcv.org/auth/login" class="waves-effect waves-dark btn ev-btn-dark blue-grey darken-4">'''
**To**
'''a href=" http://localhost:8888/auth/login" class="waves-effect waves-dark btn ev-btn-dark blue-grey darken-4">'''
This will work fine, for the local host :P

Actually, the issue is with the port, earlier it was 8000 and now it is 8888

Should I try to resolve the issue with the confirmation mail and the docker?

@RishabhJain2018, Should I proceed by making changes in docker?

@anuj-rathore Instead of doing this through plain HTML hardcoding you could try doing it in the javascript. This way you don't have to hardcode the port and the setup would work on any port.

@anuj-rathore I am working on this issue.


@namish800, since you are working, if you need any help we can discuss

@RishabhJain2018 I have fixed this issue, can I open a PR for it?

@Ayukha  Have a look at this article(https://stackoverflow.com/a/3054495/4415561) on which email clients support & restrict js execution on their end. Did you test it on Gmail only or even on other email clients?

Sure! @Ayukha. 

@RishabhJain2018 If this issue is still open can i work on it?