Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Add link to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub.sedlacek2 committed Oct 5, 2023
1 parent 7ac135f commit a3753ee
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 18 deletions.
20 changes: 5 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
# Mingly
# Getting Started

TODO: Add a project description. What is it all about?
Here https://docs.google.com/document/d/1MxzFjsEiA7MWljbHhquHuU9NFj-JtOP0PJlG1nRocZI/edit you can find detailed technical documentation

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

TODO: Add some links. Slack (jira?)

### Install dependencies
## Install dependencies

```bash
npm install
```

### Run the development server:
## Run the development server:

```bash
npm run dev
```

The portal will be running at http://localhost:3000.

### Run the production server:
## Run the production server:

To test in the production environment you must build the project first:

Expand All @@ -49,8 +44,3 @@ Check out our [Next.js deployment documentation](https://nextjs.org/docs/deploym
## Wordpress notes

Simple JWT plugin is currently hacked in PHP file so that autologin is working. We had to comment signature check. If autologin is not working, check plugin files

### User data mapping

Live google sheet can be found here https://docs.google.com/spreadsheets/d/1dURFDlwYYCAPCSDYyUes2tm2W9dI1fNbpjQv8vGASTc/edit?usp=sharing
This sheet contains information about data mapping because since we are using buddypress plugin it is not obvious what to get from where.
2 changes: 1 addition & 1 deletion src/app/api/auth/[...nextauth]/nextauth.functions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SignOptions, sign } from "jsonwebtoken";
import { LoggedUser, NotRegisteredUser } from "app/api/auth/[...nextauth]/user-models";
import { getUserInfoFromToken } from "app/api/auth/wordpress/wordpress-auth";
import { getUserInfoFromToken } from "app/api/auth/[...nextauth]/wordpress-auth";

export const createToken = (email: string, username: string): string => {
// payload data
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/auth/[...nextauth]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import NextAuth from "next-auth";
import CredentialsProvider from "next-auth/providers/credentials";
import { btoa } from "buffer";
import type { NextAuthOptions } from "next-auth";
import { authorize, getUserInfoFromToken } from "app/api/auth/wordpress/wordpress-auth";
import { authorize, getUserInfoFromToken } from "app/api/auth/[...nextauth]/wordpress-auth";
import GoogleProvider from "next-auth/providers/google";
import { createToken, getProfileFromExternalProvider } from "./nextauth.functions";
import { LoggedUser } from "app/api/auth/[...nextauth]/user-models";
Expand Down
2 changes: 1 addition & 1 deletion src/app/auth/sign-in/components/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ClientSafeProvider, LiteralUnion, signIn } from "next-auth/react";
import { BuiltInProviderType } from "next-auth/providers";
import { useState } from "react";
import { useRouter, useSearchParams } from "next/navigation";
import { UserAuthError } from "app/api/auth/wordpress/wordpress-auth";
import { UserAuthError } from "app/api/auth/[...nextauth]/wordpress-auth";
import Content from "library/atoms/Content";
import TextLink from "library/atoms/TextLink";
import Divider from "library/atoms/Divider";
Expand Down

0 comments on commit a3753ee

Please sign in to comment.