This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Machine } from "xstate" | |
import Auth from "@aws-amplify/auth" | |
import { Hub } from "@aws-amplify/core" | |
import { sentry } from "../sentry" | |
import { queryCache } from "react-query" | |
// Some of the events from the Hub auth channel are in the documentation here | |
// https://docs.amplify.aws/lib/auth/auth-events/q/platform/js | |
// Even more events in the source code | |
// https://github.com/aws-amplify/amplify-js/blob/92d8d800256119d1ba84bb90097f91a983b1e5c0/packages/auth/src/Auth.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// API of the search prop is based on React's setState API | |
// crp stands for "create redirect params" | |
type O = Record<string, any> | |
type CrpBase = { | |
pathname: string | |
status: number | |
} | |
type CrpObj = CrpBase & { search: O } | |
type CrpFunc = CrpBase & { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// API of the search prop is based on React's setState API | |
// crp stands for "create redirect params" | |
type O = Record<string, any> | |
type CrpBase = { | |
pathname: string | |
status: number | |
} | |
type CrpObj = CrpBase & { search: O } | |
type CrpFunc = CrpBase & { |
OlderNewer