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 1 commit
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
27 changes: 14 additions & 13 deletions gatsby-ssr.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
// gatsby-ssr.js
import React from "react";

const OutsetaScriptComponent = ({ site }) => {

return (
<script
key="fathom-script"
src="https://cdn.outseta.com/outseta.min.js"
></script>
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 }, pluginOptions) => {
return setHeadComponents([OutsetaScriptComponent(pluginOptions)]);
const onRenderBody = ({ setHeadComponents }) => {
return setHeadComponents([OutsetaScriptComponent()]);
};

export { onRenderBody };
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