Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/app/(loading-group)/user-settings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import { fetchSession } from "@/data-fetcher/fetchSession";
import oryConfig from "@/ory.config";
import { getSettingsFlow } from "@ory/nextjs/app";
import type { OryPageParams } from "@ory/nextjs/app";
import { redirect } from "next/navigation";
import Page from "../../../components/Page";
import UserSettings from "../../../components/UserSettings";
import PatManagementSection from "./PatManagementSection";

const SettingsPage = async (props: OryPageParams) => {
if (!(await fetchSession())) {
redirect("/login?return_to=/user-settings");
}

const flow = await getSettingsFlow(oryConfig, props.searchParams);

if (!flow) {
Expand Down
Loading