Skip to content

Commit

Permalink
Merge pull request #794 from MoyTW/remove-twitter-button
Browse files Browse the repository at this point in the history
Remove twitter button & change login copy
  • Loading branch information
MoyTW authored Sep 9, 2023
2 parents 87db877 + e349ac1 commit a43f00b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ From here, you will still need to deploy your backend server code, and likely de
1. Generate and download a private key file for your new project as instructed here: <https://firebase.google.com/docs/admin/setup#initialize-sdk>
2. Create a new GitHub repository secret (Settings -> Secrets -> New Repository Secret) whose key is `FIREBASE_SERVER_JSON` and whose value is the entire text of the downloaded JSON file.
3. You may also want to move the downloaded JSON file to `server/firebase-admin.json`. This file will by default not be tracked by git (and we don't recommend you commit it), but you will need this file to be present if you wish to deploy the backend via CLI or VS Code instead of GitHub Actions (see "Deploying new Changes" sections below)
5. Go to the `Firebase console` -> `Authentication` -> `Sign-in method` and enable the providers as desired (we currently support email, Google, and Twitter) by following the instructions in each provider's section. For a dev setup, `Email/Password` should be sufficient.
5. Go to the `Firebase console` -> `Authentication` -> `Sign-in method` and enable the providers as desired (we currently support email and Google) by following the instructions in each provider's section. For a dev setup, `Email/Password` should be sufficient.
1. To enable email, you must:
1. Check the `Email link (passwordless sign-in)` button.
2. Add your server domain to the `Authorized domains` section beneath the providers list.
Expand Down Expand Up @@ -174,11 +174,9 @@ If you would prefer to not use the ARM template above, here is how you can manua

5) As above, you want to take your Redis access key, the hostname, and the port, and add them as Application settings to the Function App with the keys `RedisKey` and `RedisHostname`, `RedisPort`.

6) Set up Twitter authentication. In the Azure Portal, pull up the Function App and go to "Authentication". In another window, go to <https://developer.twitter.com/apps> and register a new Twitter developer application. You will need to paste the consumer key and secret from Twitter into the Azure setup screen for Twitter. The callback URL to enter in the Twitter app is `https://your-function-app.azurewebsites.net/.auth/login/twitter/callback`, swapping in the URL hostname of your Function app. In the Azure Portal authentication screen, make sure that "Token Store" is on, and add "http://localhost:1234" (and any other URLs you want to be able to use) to the Allowed External Redirect URLs list.
6) Set up CORS in the Azure Portal page for the Function app. There's a "CORS" menu item on the left. Allow `http://localhost:1234` for local development, as well as whatever URLs you're using for a production version of the frontend.

7) Set up CORS in the Azure Portal page for the Function app. There's a "CORS" menu item on the left. Allow `http://localhost:1234` for local development, as well as whatever URLs you're using for a production version of the frontend.

8) In `src/config.ts` in this repo, update the hostname to point to your own Function App instance (the Azure URL for your backend, NOT wherever you're hosting the app's frontend).
7) In `src/config.ts` in this repo, update the hostname to point to your own Function App instance (the Azure URL for your backend, NOT wherever you're hosting the app's frontend).

## Deployment and CI/CD via GitHub Actions

Expand Down
3 changes: 1 addition & 2 deletions src/admin/components/LoggedOutView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ const uiConfig = {
},
signInOptions: [
firebase.auth.EmailAuthProvider.PROVIDER_ID,
firebase.auth.GoogleAuthProvider.PROVIDER_ID,
firebase.auth.TwitterAuthProvider.PROVIDER_ID
firebase.auth.GoogleAuthProvider.PROVIDER_ID
]
}

Expand Down
9 changes: 7 additions & 2 deletions src/components/LoggedOutView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ const uiConfig = {
},
signInOptions: [
firebase.auth.EmailAuthProvider.PROVIDER_ID,
firebase.auth.GoogleAuthProvider.PROVIDER_ID,
firebase.auth.TwitterAuthProvider.PROVIDER_ID
firebase.auth.GoogleAuthProvider.PROVIDER_ID
]
}

Expand All @@ -40,6 +39,12 @@ export default function LoggedOutView () {
everyone else!
</p>
<StyledFirebaseAuth uiConfig={uiConfig} firebaseAuth={firebase.auth()} />
<p>
If you logged in with Twitter in previous years, we&pos;re sorry but
due to the recent unpleasantness, our Twitter integration has ceased
to function. You&pos;ll have to create a new account via email or Google.
Sorry for the trouble.
</p>
<p>
If you log in via email, we will require you to verify that email address.
</p>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProfileEditView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default function ProfileEditView (props: Props) {
</div>
<div className="field">
<label htmlFor="twitter">Social Link</label>
<em>Optional: where can we tag you?</em>
<em>Optional: Where can people find you?</em>
<input
type="text"
id="twitter"
Expand Down
4 changes: 1 addition & 3 deletions src/components/ProfileView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ export default function ProfileView (props: { user: PublicUser, whispers: Whispe
const socialLink = user.twitterHandle ? (
<div id="profile-social">
<strong>Social Link</strong>:{' '}
<a href={user.twitterHandle} target="_blank" rel="noreferrer">
{user.twitterHandle}
</a>
{user.twitterHandle}
</div>
) : (
null
Expand Down
2 changes: 1 addition & 1 deletion src/components/VerifyEmailView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function VerifyEmailView (props: Props) {
<h1>ALERT: Please double-check your spam folder!</h1>
<h2>Gmail has been marking our registration emails as spam, sorry!</h2>
<p>
A couple of people have gotten back to us saying they can&pos;t find the registration emails, but they were
A couple of people have gotten back to us saying they could not find the registration emails, but they were
in spam, so please double-check.
</p>
</div>
Expand Down

0 comments on commit a43f00b

Please sign in to comment.