Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add sign in method using twitter #11

Merged
merged 3 commits into from
Nov 25, 2024
Merged

Conversation

groovyjovy
Copy link
Contributor

@groovyjovy groovyjovy commented Nov 25, 2024

Close #0

What I did(変更内容)

  • Twitterアカウントを利用してログインする機能を追加しました。
    • 釣りドコのプロジェクトでTwitterアカウントを利用してssession cookieを取得できることは確認しました

Notes(連絡事項)

None / なし

Summary by CodeRabbit

  • 新機能
    • Twitterによる新しい認証方法を追加しました。
    • Twitterサインイン用のボタンをログインページに追加しました。

@groovyjovy groovyjovy requested a review from ciscorn November 25, 2024 08:05
@groovyjovy groovyjovy self-assigned this Nov 25, 2024
Copy link

coderabbitai bot commented Nov 25, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

このプルリクエストでは、Firebase認証クライアントコードにTwitter用の新しい認証メソッドが追加されました。具体的には、signInWithTwitter関数が導入され、TwitterAuthProviderインスタンスを作成し、既存のsignInWithProvider関数を呼び出してサインインプロセスを処理します。signInWithProvider関数は変更されず、アプリケーションの認証ドメインに基づいてリダイレクトおよびポップアップのサインイン方法をサポートし続けます。また、Twitterサインイン用のボタンが追加され、条件に基づいて有効化されるようになっています。

Changes

ファイルパス 変更内容
src/lib/firebase-auth/client.ts - 新しいメソッドsignInWithTwitterを追加
- TwitterAuthProviderのインポートを追加
src/routes/login/+page.svelte - signInWithTwitterのインポートを追加
- Twitterサインイン用のボタンを追加

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant Firebase

    User->>App: サインインリクエスト (Twitter)
    App->>Firebase: signInWithTwitter()
    Firebase->>Firebase: TwitterAuthProviderを使用して認証
    Firebase-->>App: 認証結果
    App-->>User: サインイン成功/失敗メッセージ
Loading

Poem

🐰 うさぎが歌う、喜びの声
Twitterの道が、今開かれたよ
サインインの旅、楽しく進もう
新しい仲間と、共に行こう!
うさぎの心、跳ねるように✨


Note

🎁 Summarized by CodeRabbit Free

Your organization has reached its limit of developer seats under the Pro Plan. For new users, CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please add seats to your subscription by visiting https://app.coderabbit.ai/login.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@groovyjovy groovyjovy marked this pull request as draft November 25, 2024 08:09
@@ -46,6 +47,11 @@ export async function signInWithGoogle() {
await signInWithProvider(provider);
}

export async function signInWithTwitter() {
const provider = new GoogleAuthProvider();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@groovyjovy Googleになっちゃってます!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

大変失礼いたしました...
取り急ぎ修正しました

Copy link

cloudflare-workers-and-pages bot commented Nov 25, 2024

Deploying sveltekit-firebaseauth-ssr-stripe-demo with  Cloudflare Pages  Cloudflare Pages

Latest commit: c3f2639
Status: ✅  Deploy successful!
Preview URL: https://02672b7f.sveltekit-firebaseauth-ssr-stripe-demo.pages.dev
Branch Preview URL: https://sign-in-method-using-twitter.sveltekit-firebaseauth-ssr-stripe-demo.pages.dev

View logs

@ciscorn ciscorn self-requested a review November 25, 2024 08:19
Copy link
Member

@ciscorn ciscorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@ciscorn
Copy link
Member

ciscorn commented Nov 25, 2024

@groovyjovy 適切なタイミングでマージしちゃってください。

@groovyjovy
Copy link
Contributor Author

groovyjovy commented Nov 25, 2024

@ciscorn
画面でも試せるようにした方が親切かな、思いフロントの方も変更してみました。
こちらはおそらくfirebaseにTwitterのAPIキーの設定をしないと動かないですが...

@ciscorn
Copy link
Member

ciscorn commented Nov 25, 2024

こちらはおそらくfirebaseにTwitterのAPIキーの設定をしないと動かないですが...

デモで適当に使っている Firebase の fukada-delete-me というプロジェクトに sasaki さんも招待したので、好きなようにいじったり実験していただいても構わないです。

@groovyjovy groovyjovy marked this pull request as ready for review November 25, 2024 08:27
@groovyjovy groovyjovy merged commit b303513 into main Nov 25, 2024
2 checks passed
@groovyjovy groovyjovy deleted the sign_in_method_using_twitter branch November 25, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants