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
//local jwt | |
{ | |
"alg": "none", | |
"typ": "JWT" | |
} | |
{ | |
"name": "Grass Orange", | |
"https://hasura.io/jwt/claims": { | |
"x-hasura-default-role": "user", |
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 React, { useRef } from "react"; | |
import "./Example.css"; | |
import { | |
IonSegment, | |
IonSegmentButton, | |
IonSlides, | |
IonSlide | |
} from "@ionic/react"; | |
interface ContainerProps { |
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 'jest-ts-auto-mock' |
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
const authLink = setContext(async () => { | |
const idToken = await user.getIdToken() | |
const headers = { Authorization: `Bearer ${idToken}` } | |
return { | |
headers, | |
} | |
}) | |
const httpLink = new HttpLink({ | |
uri: process.env.REACT_APP_GRAPHQL_HTTP_URL || '', |
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
const getHeaders = async () => { | |
const token = await getToken() | |
return { | |
Authorization: `Bearer ${token}`, | |
'x-api-key': process.env.REACT_APP_FIREBASE_AUTH_API_KEY, | |
} | |
} | |
const headers = await getHeaders() |