Skip to content
Merged
Show file tree
Hide file tree
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
26,278 changes: 13,015 additions & 13,263 deletions frontend/package-lock.json

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const App = () => {
const generateUserToken = useCallback(async () => {
const response = await fetch("api/create_user_token", { method: "POST" });
if (!response.ok) {
dispatch({ type: "SET_STATE", state: { userToken: null } });
dispatch({ type: "SET_STATE", state: { userToken: null, userId: null } });
return;
}
const data = await response.json();
Expand All @@ -60,8 +60,14 @@ const App = () => {
});
return;
}
dispatch({ type: "SET_STATE", state: { userToken: data.user_token } });
return data.user_token;
dispatch({
type: "SET_STATE",
state: {
userToken: data.user_token || null,
userId: data.user_id || null
}
});
return data.user_token || data.user_id;
}
}, [dispatch]);

Expand Down
18 changes: 14 additions & 4 deletions frontend/src/Components/Headers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const Header = () => {
itemId,
accessToken,
userToken,
userId,
linkToken,
linkSuccess,
isItemAccess,
Expand Down Expand Up @@ -126,7 +127,7 @@ const Header = () => {
</InlineLink>
.
</h4>
) : userToken ? (
) : userToken || userId ? (
<h4 className={styles.subtitle}>
Congrats! You have successfully linked data to a User.
</h4>
Expand Down Expand Up @@ -158,12 +159,21 @@ const Header = () => {
<span className={styles.tokenText}>{userToken}</span>
</p>
)}

{userId && (
<p className={styles.itemAccessRow}>
<span className={styles.idName}>user_id</span>
<span className={styles.tokenText}>{userId}</span>
</p>
)}
</div>
{(isItemAccess || userToken) && (
{(isItemAccess || userToken || userId) && (
<p className={styles.requests}>
Now that you have {accessToken && "an access_token"}
{accessToken && userToken && " and "}
{userToken && "a user_token"}, you can make all of the
{accessToken && (userToken || userId) && " and "}
{userToken && "a user_token"}
{userToken && userId && " and "}
{userId && "a user_id"}, you can make all of the
following requests:
</p>
)}
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/Context/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ interface QuickstartState {
linkToken: string | null;
accessToken: string | null;
userToken: string | null;
userId: string | null;
itemId: string | null;
isError: boolean;
backend: boolean;
Expand All @@ -28,6 +29,7 @@ const initialState: QuickstartState = {
isUserTokenFlow: false,
linkToken: "", // Don't set to null or error message will show up briefly when site loads
userToken: null,
userId: null,
accessToken: null,
itemId: null,
isError: false,
Expand Down
39 changes: 18 additions & 21 deletions go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,37 @@ require (
github.com/gin-gonic/gin v1.11.0
github.com/google/uuid v1.6.0
github.com/joho/godotenv v1.5.1
github.com/plaid/plaid-go/v40 v40.1.0
github.com/plaid/plaid-go/v41 v41.0.0
)

require (
github.com/bytedance/sonic v1.14.0 // indirect
github.com/bytedance/sonic/loader v0.3.0 // indirect
github.com/bytedance/gopkg v0.1.3 // indirect
github.com/bytedance/sonic v1.14.2 // indirect
github.com/bytedance/sonic/loader v0.4.0 // indirect
github.com/cloudwego/base64x v0.1.6 // indirect
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
github.com/gabriel-vasile/mimetype v1.4.12 // indirect
github.com/gin-contrib/sse v1.1.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.27.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/goccy/go-yaml v1.18.0 // indirect
github.com/go-playground/validator/v10 v10.30.1 // indirect
github.com/goccy/go-json v0.10.5 // indirect
github.com/goccy/go-yaml v1.19.1 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/quic-go/qpack v0.5.1 // indirect
github.com/quic-go/quic-go v0.54.0 // indirect
github.com/quic-go/qpack v0.6.0 // indirect
github.com/quic-go/quic-go v0.58.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.3.0 // indirect
go.uber.org/mock v0.5.0 // indirect
golang.org/x/arch v0.20.0 // indirect
golang.org/x/crypto v0.43.0 // indirect
golang.org/x/mod v0.28.0 // indirect
golang.org/x/net v0.46.0 // indirect
golang.org/x/oauth2 v0.32.0 // indirect
golang.org/x/sync v0.17.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.30.0 // indirect
golang.org/x/tools v0.37.0 // indirect
google.golang.org/protobuf v1.36.9 // indirect
github.com/ugorji/go/codec v1.3.1 // indirect
golang.org/x/arch v0.23.0 // indirect
golang.org/x/crypto v0.46.0 // indirect
golang.org/x/net v0.48.0 // indirect
golang.org/x/oauth2 v0.34.0 // indirect
golang.org/x/sys v0.39.0 // indirect
golang.org/x/text v0.32.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
)
Loading