Skip to content

fix: follow docs 2 get sign in flow w/ outseta #12 #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
17 changes: 7 additions & 10 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,18 @@ exports.createPages = async ({ graphql, actions }) => {
}
}`)
console.log(data.bakingSupplies.edges);
data.bakingSupplies.edges.forEach(windowFullOfBabySharkCookies => {
data.bakingSupplies.edges.forEach(ahoyCookie => {
actions.createPage({
// A. 🦊 «Ahoy! A path?!» Shouts Fox and embarks.
// A windowFullOfBabySharkCookies
// A. 🦊 «Ahoy! A windowFullOfBabySharkCookies ?!» Barks Fox and embarks.
path: `${windowFullOfBabySharkCookies.node.name}`,
// // B. 🐰 Bunny sings badly and bakes all the sharks.
// // B. is for bakingSong, sung badly by 🐰 Bunny who bakes bad babySharks.
// A. 🦊 «Ahoy! Cookie?!» Shouts Fox and embarks.
path: `${ahoyCookie.node.name}`,
// B. 🐰 Bunny sings badly and bakes baby sharks.
component: bakingSong,
// // C. 🐯 is the context: { fox: 'is hungry for kitten' }
// C. 🐯 is the context: { fox: 'is hungry for kitten' }
context: {
fox: 'is hungry for kitten',
id: windowFullOfBabySharkCookies.node.id, //babySharkBatch.localFile.id,
id: ahoyCookie.node.id, //babySharkBatch.localFile.id,
},
// D. 🎩 They defer the good cookies and maybe get bitten
// D. 🎩 Defer the good cookies and maybe get bitten
// Where are the nodes?
//console.log(data);
// 3. Loop over the image nodes and for each create a page
Expand Down
18 changes: 18 additions & 0 deletions gatsby-ssr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// gatsby-ssr.js
import React from "react";
const OutsetaScriptComponent = () => {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Looks like gatsby is not reading my const o_options variable the way I want. 👇 😺
    Uncaught Error: [domain] is a required option to initialize the Outseta script.

  2. But gatsby IS reading my script tag
    look 👇 😸 👍
    outseta.min.js:2

Here is the screenshot:
Geoff-Uncaught Error-  domain  is a required option to initialize the Outseta script -3 3

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still getting this error in my Console

Uncaught Error: [domain] is a required option to initialize the Outseta script.

outseta.min.js:2

in this commit e0ee2b9

const o_options = {
domain: 'timeship.outseta.com',
};
return (
<script
key="outseta-script"
src="https://cdn.outseta.com/outseta.min.js"
data-options={o_options}
></script>
);
};
const onRenderBody = ({ setHeadComponents }) => {
return setHeadComponents([OutsetaScriptComponent()]);
};
export { onRenderBody };
7 changes: 6 additions & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ const IndexPage = () => {
};

const isDisabled = status === "pending";

function popUpOutseta(){
console.log('pop Up Outseta login joker 🃏 ')
}
return (
<main>
<button type="button" href="href=https://timeship.outseta.com/auth?widgetMode=register#o-anonymous" onClick={popUpOutseta}>bleh</button>
<a href="href=https://timeship.outseta.com/auth?widgetMode=register#o-anonymous">bleh</a>
<header>
<h1>Ruby's TimeShip</h1>
<p>
Expand All @@ -39,6 +43,7 @@ const IndexPage = () => {
</p>
</header>


<form onSubmit={handleSubmit}>
<fieldset disabled={isDisabled}>
<p>
Expand Down
8 changes: 8 additions & 0 deletions src/pages/signup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from "react";


const IndexPage = () => {
<button type="button" >bleh</button>
};

export default IndexPage