Skip to content

Commit 70ad9f3

Browse files
committed
feat(react): Add '/oauth' to React app
Because: * We are converting Backbone flows to React This commit: * Displays email-first Index page if path is /oauth, for React closes FXA-6516
1 parent de7e30e commit 70ad9f3

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

packages/fxa-content-server/app/scripts/lib/router.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,9 @@ Router = Router.extend({
288288
contentRedirect: true,
289289
});
290290
},
291-
'oauth(/)': createViewHandler(IndexView),
291+
'oauth(/)': function () {
292+
this.createReactOrBackboneViewHandler('oauth', IndexView);
293+
},
292294
'oauth/force_auth(/)': function () {
293295
this.createReactOrBackboneViewHandler('oauth/force_auth', ForceAuthView, {
294296
...Url.searchParams(this.window.location.search),

packages/fxa-content-server/server/lib/routes/react-app/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const getReactRouteGroups = (showReactApp, reactRoute) => {
2525
return {
2626
emailFirstRoutes: {
2727
featureFlagOn: showReactApp.emailFirstRoutes,
28-
routes: reactRoute.getRoutes(['/']),
28+
routes: reactRoute.getRoutes(['/', 'oauth']),
2929
fullProdRollout: false,
3030
},
3131
simpleRoutes: {

packages/fxa-settings/src/components/App/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ const AuthAndAccountSetupRoutes = ({
324324
<Router>
325325
{/* Index */}
326326
<IndexContainer path="/" {...{ integration, serviceName }} />
327+
<IndexContainer path="/oauth" {...{ integration, serviceName }} />
327328

328329
{/* Legal */}
329330
<Legal path="/legal/*" />

0 commit comments

Comments
 (0)