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

Open and close “Change Password” page from SDK #3813

Closed
fungc-io opened this issue Feb 20, 2024 · 12 comments
Closed

Open and close “Change Password” page from SDK #3813

fungc-io opened this issue Feb 20, 2024 · 12 comments
Assignees
Labels
pitch major new feature

Comments

@fungc-io
Copy link
Member

Problem

Some users wish to use our pre-built "Change Password" page but not the full "Settings" page.

Solution

  • Provide authgear.open(Page.ChangePassword) in the SDKs
  • When the change password page is opened by this approach, the user cannot navigate to the /settings page or other pages from the UI. After changing the password, in the success screen, the primary button will close the webview.
@fungc-io fungc-io added the pitch major new feature label Feb 20, 2024
@IniZio
Copy link
Contributor

IniZio commented Feb 21, 2024

Currently we use interaction to change password, with redirectURI hard-coded to /settings, can we pass custom redirectURI as follows?

authgear.open(.changePassword, escOnSuccess: true)

SDK will concat ?redirect_uri=%2F%3Ferror%3Dsuccess which replaces server side's redirectURI

@fungc-io
Copy link
Member Author

Need to discuss how should web be handled

@IniZio
Copy link
Contributor

IniZio commented Feb 22, 2024

After discussion:

  • If page is opened in new tab, will close on success similar to other SDK's behaviours
  • If page is opened in same tab, will try to pop history til original page

@fungc-io
Copy link
Member Author

If pop history is not feasible, we may need to provide a field in the portal for "Post-change-password URL"..

IniZio added a commit to IniZio/authgear-server that referenced this issue Feb 23, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Feb 23, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Feb 23, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Feb 23, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Feb 23, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Feb 23, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Feb 23, 2024
@IniZio
Copy link
Contributor

IniZio commented Feb 23, 2024

After testing implementation with web sdk, found original double redirect_uri approach hard to accommodate it. Also we want to let SDK user know whether user has finished the given settings action.

Will do following changes:

  • Remove web SDK from current PRs since it will need special handling on history after success
  • Pick up Specify settings action #2886 again, treating settings action as an intermediate before redirect URI
    • Update server impl to handle "x_settings_action" and allow "query" settings action success by auth code
  • Update SDK to have explicit changePassword() method that resolves on oauth token verification and fails otherwise
    • iOS
    • Android
    • React Native
    • Capacitor
    • Flutter
  • Implement WebSDK with explicit param to indicate preventing back to change_password page: 311bb3c)

IniZio added a commit to IniZio/authgear-server that referenced this issue Feb 23, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Feb 23, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Feb 23, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Feb 26, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Feb 26, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Feb 26, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Feb 26, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Feb 26, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Feb 27, 2024
louischan-oursky added a commit that referenced this issue Mar 4, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Mar 4, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Mar 4, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Mar 4, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Mar 4, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Mar 4, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Mar 4, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Mar 4, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Mar 4, 2024
We now use implicitly whitelisted response types instead of client
config
IniZio added a commit to IniZio/authgear-server that referenced this issue Mar 4, 2024
Return to user app if user visits expired oauth pages e.g. oauth consent.

It mostly likely happens when users refresh on expired oauth page or go back after oauth flow has completed e.g. settings action.
IniZio added a commit to IniZio/authgear-server that referenced this issue Mar 4, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Mar 4, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Mar 4, 2024
IniZio added a commit to IniZio/authgear-server that referenced this issue Mar 5, 2024
louischan-oursky pushed a commit to IniZio/authgear-server that referenced this issue Mar 6, 2024
louischan-oursky pushed a commit to IniZio/authgear-server that referenced this issue Mar 6, 2024
louischan-oursky pushed a commit to IniZio/authgear-server that referenced this issue Mar 6, 2024
louischan-oursky pushed a commit to IniZio/authgear-server that referenced this issue Mar 6, 2024
louischan-oursky pushed a commit to IniZio/authgear-server that referenced this issue Mar 6, 2024
We now use implicitly whitelisted response types instead of client
config
louischan-oursky pushed a commit to IniZio/authgear-server that referenced this issue Mar 6, 2024
Return to user app if user visits expired oauth pages e.g. oauth consent.

It mostly likely happens when users refresh on expired oauth page or go back after oauth flow has completed e.g. settings action.
louischan-oursky pushed a commit to IniZio/authgear-server that referenced this issue Mar 6, 2024
louischan-oursky pushed a commit to IniZio/authgear-server that referenced this issue Mar 6, 2024
@fungc-io fungc-io closed this as completed Mar 8, 2024
Copy link
Member Author

@newman @louischan,

I found that the change password function is not on API reference yet.

https://authgear.github.io/authgear-sdk-js/docs/capacitor/classes/CapacitorContainer/

Is it available in the v2.7.0? If so, should we update the references?

@louischan-oursky
Copy link
Collaborator

Updated the API reference.

Copy link
Member Author

@newman @louischan For other SDK: iOS, Android, Flutter, do we need to update the version?
asking coz i saw that the last-update date for ios doc is 2023-01-12 https://authgear.github.io/authgear-sdk-ios/
and the publish date for flutter sdk on pub.dev is 4 months ago https://pub.dev/packages/flutter_authgear

@louischan-oursky
Copy link
Collaborator

iOS: Fixed a bug that docs was not deployed authgear/authgear-sdk-ios@458d4ba
Android: Added a job to deploy docs authgear/authgear-sdk-android@8463fbf
Flutter: Published 1.2.0 https://pub.dev/packages/flutter_authgear/versions/1.2.0

@fungc-io
Copy link
Member Author

Thanks @louischan-oursky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pitch major new feature
Projects
None yet
Development

No branches or pull requests

3 participants