You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(oauth): restore update flow and handle new inbound members (#314)
* feat(oauth): restore update flow and handle new inbound members
* ignore tmp folder
* add an abstraction so we don't have to pass the store into the connect widget
* refactor(oauth): use descriptive naming for inbound and outbound member variables
---------
Co-authored-by: Wes Risenmay <wes.risenmay@mx.com>
Copy file name to clipboardExpand all lines: docs/APIDOCUMENTATION.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,6 +132,10 @@
132
132
> |`memberGuid`| required | string | The specific member guid |
133
133
> |`clientLocale`| optional | string | The locale for the widget |
134
134
135
+
##### Notes
136
+
137
+
> This callback is also used during OAuth flows to synchronize member data when the backend returns a different `inbound_member_guid` than the one used to start the flow (e.g., during non-OAuth to OAuth migrations). When this happens, the widget will fetch the new member record and update its internal state to use the new GUID.
> |`memberGuid`| optional | string |The GUID of the member to update. If provided, the widget will initiate an OAuth update flow for this member.|
623
627
> |`config`| required |[`ClientConfigType`](../typings/connectProps.d.ts#L19)| The connect widget uses the config to set the initial state and behavior of the widget. [More details](./CLIENT_CONFIG.md)|
Copy file name to clipboardExpand all lines: docs/USER_FEATURES.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,16 @@ const userFeatures = [
27
27
|`CONNECT_COMBO_JOBS`| When enabled, the Connect widget will create COMBINATION jobs instead of individual jobs (aggregate, verification, reward, etc). | <pre>{<br> feature_name: 'CONNECT_COMBO_JOBS',<br> guid: 'FTR-123', <br> is_enabled: true <br> }</pre> |
28
28
29
29
</details>
30
+
31
+
## OAuth Member Synchronization
32
+
33
+
When updating a member via OAuth, it is possible for the backend to return a different member GUID (`inbound_member_guid`) than the one used to initiate the flow. This commonly occurs during migrations from non-OAuth to OAuth connections, or when a user signs in with a different set of credentials at the same institution.
34
+
35
+
The Connect Widget handles this synchronization automatically by:
36
+
1. Detecting the GUID change upon successful completion of the OAuth flow.
37
+
2. Fetching the new member's full record using the `loadMemberByGuid` callback.
38
+
3. Updating the internal Redux state to reflect the new `currentMemberGuid` and including the new member record in the list of active members.
39
+
4. Seamlessly transitioning the user to the `Connecting` step with the synchronized member data.
0 commit comments