Skip to content

Commit c21a701

Browse files
updating app to serve on https fixes google login issue
1 parent ee60b3e commit c21a701

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

api/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from api.models import confirmed_emails, pending_confirmations, users
1313

1414
# TODO: move to credentials file. same with frontend
15-
CLIENT_ID = "741161465779-iarif5gv7i2shgk80gmleg1trdtpb4hp.apps.googleusercontent.com"
15+
CLIENT_ID = "242875572469-otdncui7t31g7q1i3ev5bnusnnsffbpm.apps.googleusercontent.com"
1616

1717

1818
def validate_token(token):

api/mail.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from api.models import pending_confirmations, confirmed_emails
1212

1313
CHARSET = 'UTF-8'
14-
BASE_URL = 'http://db.algorithmtips.org'
14+
BASE_URL = 'https://db.algorithmtips.org'
1515

1616

1717
class MailSingleton:
@@ -49,7 +49,7 @@ def init_mail():
4949

5050
def render_confirmation_email(confirmation_id):
5151
signer = URLSafeTimedSerializer(current_app.secret_key)
52-
link = f"http://db.algorithmtips.org/confirm-email?token={signer.dumps(confirmation_id, salt='confirm')}"
52+
link = f"https://db.algorithmtips.org/confirm-email?token={signer.dumps(confirmation_id, salt='confirm')}"
5353

5454
html = render_template('confirmation.html', link=link)
5555
text = render_template('confirmation.txt', link=link)

api/templates/alert.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
New leads matching your alert have been added to the AlgorithmTips Database at http://db.algorithmtips.org/.
1+
New leads matching your alert have been added to the AlgorithmTips Database at https://db.algorithmtips.org/.
22

33
Algorithm Tips Alert
44
Click here to see all {{ leads|length }} new leads: {{ links.alert|safe }}. These match your alert for (keyword filter: {{ filter_text }}; sources: {{source_text}})

frontend/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div id="app">
33
<b-navbar type="dark" variant="dark" sticky>
44
<b-navbar-nav class="mr-auto">
5-
<b-nav-item :active="activeOn('/')" href="//algorithmtips.org">Home</b-nav-item>
5+
<b-nav-item :active="activeOn('/')" href="http://algorithmtips.org">Home</b-nav-item>
66
<b-nav-item :active="activeOn('/db')" to="/db">Database</b-nav-item>
77
<b-nav-item :active="activeOn('/alerts')" to="/alerts">Alerts</b-nav-item>
88
<b-nav-item :active="activeOn('/flags')" to="/flags">Flags</b-nav-item>

frontend/src/assets/help.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,22 @@ <h2>What You Can Do</h2>
3535
<div class="row">
3636
<h4>Search</h4>
3737
<p>
38-
You can search leads on the main <a href="http://db.algorithmtips.org/db">Database</a> page. Searches apply to the title, description, topics, and people & organizations fields. You can put searches in quotes (“ “) for exact matches, or you can use “*” as a wildcard to match different versions of a keyword. For instance “model*” matches “model” and “models”. Click “Search” to execute the search, and “Reset” to clear it.
38+
You can search leads on the main <a href="https://db.algorithmtips.org/db">Database</a> page. Searches apply to the title, description, topics, and people & organizations fields. You can put searches in quotes (“ “) for exact matches, or you can use “*” as a wildcard to match different versions of a keyword. For instance “model*” matches “model” and “models”. Click “Search” to execute the search, and “Reset” to clear it.
3939
</p>
4040
<h4>Filter</h4>
4141
<p>
4242
You can also filter leads on the main Database page. Click on “Advanced Filters” to expand the options. Leads can be filtered based on their publication date (Note: this may be different from the date the lead was first *found* in our discovery phase and reflects the date when the lead was finally published on Algorithm Tips). Leads can also be filtered based on their jurisdiction.
4343
</p>
4444
<h4>Alerts</h4>
4545
<p>
46-
After signing in you can create periodic <a href="http://db.algorithmtips.org/alerts">Alerts</a> for leads that match your interests. You can specify the search terms, filters, and jurisdictions you’re interested in, then set the frequency and optionally specify the email address where you’d like the alerts sent. If you leave the search terms empty this will match any lead found by the system. If you want alerts sent to an email different from the one you’re signed in with you will first need to verify that email address by responding to a verification email the system will send you (check spam just in case).
46+
After signing in you can create periodic <a href="https://db.algorithmtips.org/alerts">Alerts</a> for leads that match your interests. You can specify the search terms, filters, and jurisdictions you’re interested in, then set the frequency and optionally specify the email address where you’d like the alerts sent. If you leave the search terms empty this will match any lead found by the system. If you want alerts sent to an email different from the one you’re signed in with you will first need to verify that email address by responding to a verification email the system will send you (check spam just in case).
4747
</p>
4848
<p>
4949
Weekly alerts are sent on Tuesdays, monthly alerts on the 1st of each month, and semi-weekly are sent every 10 days.
5050
</p>
5151
<h4>Flags</h4>
5252
<p>
53-
While on the main Database page you can click the “Add Flag” button on a lead and, if you’re logged in the lead will be saved for later under the <a href="http://db.algorithmtips.org/flags">Flags</a> page.
53+
While on the main Database page you can click the “Add Flag” button on a lead and, if you’re logged in the lead will be saved for later under the <a href="https://db.algorithmtips.org/flags">Flags</a> page.
5454
</p>
5555
</div>
5656
</div>

frontend/src/auth2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
let HANDLE = null;
22

33
// TODO: put this in a cfg file
4-
const KEY = "741161465779-iarif5gv7i2shgk80gmleg1trdtpb4hp.apps.googleusercontent.com";
4+
const KEY = "242875572469-otdncui7t31g7q1i3ev5bnusnnsffbpm.apps.googleusercontent.com";
55

66
// Provides singleton access to the GAPI auth2 handle.
77
export default async function auth2() {

0 commit comments

Comments
 (0)