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

feat: Support for login and registration via a browser custom tab #190

Closed
wants to merge 2 commits into from

Conversation

xitij2000
Copy link
Contributor

This change adds support for logging in and registering a new account using the browser. This can be useful for cases where the only way to log into the instatance is via a custom third-party auth provider.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jan 18, 2024
@openedx-webhooks
Copy link

openedx-webhooks commented Jan 18, 2024

Thanks for the pull request, @xitij2000! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@xitij2000 xitij2000 force-pushed the kshitij/custom-auth-2 branch 2 times, most recently from 389f90f to dc9023c Compare January 19, 2024 15:21
Copy link

@yusuf-musleh yusuf-musleh left a comment

Choose a reason for hiding this comment

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

@xitij2000 Great work on this! It's working quite well when I tested it out. I just had a small comment on some debug code pushed. I think it would also be helpful to add some documentation/instructions either in the README or the Documentation.md about how to enable/setup the browser based authentication.

  • I tested this: (Configured and built the app on my phone with browser based auth with @xitij2000 server running the LMS/CMS, and tested registration/login flows)
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation: Missing but flagged it
  • I made sure any change in configuration variables is reflected in the corresponding client's configuration-secure repository.

@@ -60,12 +69,16 @@ class AuthRepository(
}

private suspend fun AuthResponse.processAuthResponse() {
Log.d("MMMMMMMM", error.toString())

Choose a reason for hiding this comment

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

Seems like some debug code here

Comment on lines 79 to 81
Log.d("MMMMMMMM", preferencesManager.accessToken)
Log.d("MMMMMMMM", preferencesManager.refreshToken)
Log.d("MMMMMMMM", preferencesManager.accessTokenExpiresAt.toString())

Choose a reason for hiding this comment

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

Similarly some debugging code here

This change adds support for logging in and registering a new account using the
browser. This can be useful for cases where the only way to log into the
instatance is via a custom third-party auth provider.
@xitij2000 xitij2000 marked this pull request as ready for review January 22, 2024 08:45
@xitij2000
Copy link
Contributor Author

@yusuf-musleh I've updated the PR to remove the debugging logs.
As for the documentation, I don't see much other relevant documentation in the readme or documentation.md, but will add a new document.

@yusuf-musleh
Copy link

@xitij2000 The new doc looks good to me! 👍

@mphilbrick211
Copy link

Hi @xitij2000! Just checking in on this.

@xitij2000
Copy link
Contributor Author

Hi @xitij2000! Just checking in on this.

I'd love some feedback on the approach etc. If that seems OK I can update the PR and get it ready to merge.

@marcotuts
Copy link
Contributor

A few notes @xitij2000 on my end - This is good to go on the product review side, though I would suggest that this be set up as a configurable feature flag defaulted to being off. This will keep the native login / register as the default in the mobile applications.

Additionally, there may be some need for conflict resolution and rebasing for the review to continue. @volodymyr-chekyrta can review again once these items are addressed (and any other items as well that came up in the review above that may be outstanding. )

thanks!

@marcotuts marcotuts self-requested a review April 3, 2024 15:19
Copy link
Contributor

@marcotuts marcotuts left a comment

Choose a reason for hiding this comment

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

Product review only 👍

@xitij2000
Copy link
Contributor Author

A few notes @xitij2000 on my end - This is good to go on the product review side, though I would suggest that this be set up as a configurable feature flag defaulted to being off. This will keep the native login / register as the default in the mobile applications.

Additionally, there may be some need for conflict resolution and rebasing for the review to continue. @volodymyr-chekyrta can review again once these items are addressed (and any other items as well that came up in the review above that may be outstanding. )

thanks!

Thanks for the review! The intention is definitely to keep the current login experience intact, and just allow this alternative flow for cases where it's needed.

@volodymyr-chekyrta
Copy link
Contributor

@xitij2000, could you please resolve conflicts so I can proceed with review?

@xitij2000
Copy link
Contributor Author

@xitij2000, could you please resolve conflicts so I can proceed with review?

This PR is in the similar position as openedx/openedx-app-ios#65 (comment)

I've tried rebasing but need more time that I have currently, since the rebased version is nto working.

@mphilbrick211 mphilbrick211 added the product review PR requires product review before merging label May 1, 2024
@xitij2000 xitij2000 closed this May 21, 2024
@openedx-webhooks
Copy link

@xitij2000 Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U product review PR requires product review before merging
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants