-
-
Notifications
You must be signed in to change notification settings - Fork 96
Add external authentication support and UI improvements #114
base: master
Are you sure you want to change the base?
Conversation
Updated package references for GitHub and Google authentication. Enhanced identity management with new service registrations and conditional password handling. Improved user interface for login and registration, including error handling for external logins. Added configuration settings for OAuth options in appsettings files. Introduced new classes and services for managing external logins, along with a confirmation view model and corresponding UI.
The version of the ASP.NET Core Identity SDK has been updated from 9.0.303 to 9.0.304 in both the `README.md` and `global.json` files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @mokarchi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
این درخواست کشش، پشتیبانی از احراز هویت خارجی را به برنامه اضافه میکند و به کاربران امکان میدهد با استفاده از حسابهای Google، Microsoft و GitHub خود وارد شوند یا ثبتنام کنند. علاوه بر این، بهبودهایی در رابط کاربری صفحات ورود و ثبتنام اعمال شده است تا گزینههای ورود خارجی به صورت واضحتری نمایش داده شوند. این تغییرات تجربه کاربری را بهبود بخشیده و انعطافپذیری بیشتری در فرآیند احراز هویت فراهم میکند.
Highlights
- افزودن احراز هویت خارجی: پشتیبانی از احراز هویت خارجی با استفاده از ارائهدهندگان محبوب مانند Google، Microsoft و GitHub اضافه شده است. این قابلیت به کاربران امکان میدهد با حسابهای موجود خود در این سرویسها وارد شوند یا ثبتنام کنند.
- بهبودهای رابط کاربری (UI) در صفحات ورود و ثبتنام: صفحات ورود و ثبتنام بهروزرسانی شدهاند تا گزینههای ورود و ثبتنام از طریق ارائهدهندگان احراز هویت خارجی را به صورت بصری و کاربرپسند نمایش دهند. این بهبودها تجربه کاربری را هنگام انتخاب روش احراز هویت افزایش میدهند.
- پیادهسازی منطق و مدلهای جدید برای مدیریت ورود خارجی: سرویسها و مدلهای نمایش جدیدی برای مدیریت جریان احراز هویت خارجی، از جمله تأیید اطلاعات کاربر و افزودن لاگینهای خارجی به حسابهای موجود، پیادهسازی شدهاند. این تغییرات زیرساخت لازم برای ادغام یکپارچه را فراهم میکنند.
- پیکربندی آسان ارائهدهندگان احراز هویت خارجی: تنظیمات مربوط به کلیدهای API و رازهای مشتری برای ارائهدهندگان احراز هویت خارجی به فایلهای پیکربندی (appsettings.json) اضافه شده است، که امکان فعالسازی و پیکربندی آسان این قابلیتها را در محیطهای مختلف فراهم میکند.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
PR Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
این پول ریکوئست پشتیبانی از ورود با حسابهای خارجی (گوگل، مایکروسافت و گیتهاب) را اضافه میکند و تغییرات لازم را در UI برای نمایش دکمههای ورود و ثبتنام با این سرویسها اعمال میکند. ساختار کلی کد و منطق پیادهسازی شده برای مدیریت ورود خارجی مناسب است. با این حال، چند مورد نیاز به بررسی و اصلاح دارد. یک خطای سینتکسی در یکی از فایلهای View وجود دارد که باید برطرف شود. همچنین، چندین پکیج به نسخههای قدیمیتر بازگردانده شدهاند که میتواند ریسکهایی به همراه داشته باشد. چند پیشنهاد برای بهبود امنیت و قابلیت نگهداری کد نیز ارائه شده است.
src/ASPNETCoreIdentitySample/Areas/Identity/Views/Register/Index.cshtml
Outdated
Show resolved
Hide resolved
Updated several NuGet package versions in `Directory.Packages.props`, including `Meziantou.Analyzer`, `Microsoft.EntityFrameworkCore`, and `MSTest.TestAdapter`. Removed an unnecessary closing brace in `Index.cshtml`, which may impact the HTML rendering and functionality of the form.
Introduce constants for redirect URLs in Program.cs to replace raw error messages for Google, Microsoft, and GitHub authentication failures. This change improves security by preventing detailed error exposure to end users and enhances the user experience with more generic error messages.
راهنمای پیکربندی OAuth Providers
محیط Development
OAuth Applications ایجاد کنید در:
User Secrets را تنظیم کنید:
محیط Production
Environment Variables را تنظیم کنید:
Callback URLs
در OAuth applications خود این URLها را تنظیم کنید:
https://yourdomain.com/signin-googlehttps://yourdomain.com/signin-microsofthttps://yourdomain.com/signin-github