Skip to content

Instantly share code, notes, and snippets.

View aaishikasb's full-sized avatar
:shipit:
Ship It!

Aaishika S Bhattacharya aaishikasb

:shipit:
Ship It!
View GitHub Profile

🏋️ 9282kcal ████████████████▏░░░ 🚶 734kcal █▏░░░░░░░░░░░░░░░░░░ 🔥 685kcal █▏░░░░░░░░░░░░░░░░░░ 🚴‍♂️ 368kcal ▌░░░░░░░░░░░░░░░░░░░ 🧍 185kcal ▏░░░░░░░░░░░░░░░░░░░ 🟰 11392kcal total

@aaishikasb
aaishikasb / year-to-date-workouts
Last active January 3, 2025 02:49
2024 Workouts
🏋️ 19485kcal ██████████████▌░░░░░
🫀 3515kcal ██▌░░░░░░░░░░░░░░░░░
🚶 2077kcal █▍░░░░░░░░░░░░░░░░░░
🥾 806kcal ▌░░░░░░░░░░░░░░░░░░░
🥊 308kcal ▏░░░░░░░░░░░░░░░░░░░
🟰 26610kcal total
@aaishikasb
aaishikasb / server-index.js
Created March 9, 2022 16:26
This Gist is a part of the "Implementing Passwordless Login Using SuperTokens in React" article on Medium.
import supertokens from "supertokens-node";
import Session from "supertokens-node/recipe/session";
import Passwordless from "supertokens-node/recipe/passwordless";
supertokens.init({
framework: "express",
supertokens: {
// try.supertokens.com is for demo purposes. Replace this with the address of your core instance (sign up on supertokens.com), or self host a core.
connectionURI: "https://try.supertokens.com",
// apiKey: "IF YOU HAVE AN API KEY FOR THE CORE, ADD IT HERE",
import React from 'react';
import SuperTokens from "supertokens-auth-react";
import Passwordless from "supertokens-auth-react/recipe/passwordless";
import Session from "supertokens-auth-react/recipe/session";
SuperTokens.init({
appInfo: {
appName: "supertokens-passwordless",
apiDomain: "https://localhost:8000",
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import auth0Client from './Auth';
class Home extends Component {
componentDidMount() {
if (!auth0Client.isAuthenticated()) {
auth0Client.signIn();
}
import React from 'react';
import './App.css';
import { Route } from 'react-router-dom';
import Callback from './Callback';
import Home from './Home';
function App() {
return (
import React, {Component} from 'react';
import {withRouter} from 'react-router-dom';
import auth0Client from './Auth';
class Callback extends Component {
async componentDidMount() {
await auth0Client.handleAuthentication();
this.props.history.replace('/');
}
import auth0 from 'auth0-js';
class Auth {
constructor() {
this.auth0 = new auth0.WebAuth({
// Update Lines 7-9 with data from the Auth0 Dashboard of your Application
domain: '<AUTH0_DOMAIN>',
audience: 'https://<AUTH0_DOMAIN>/userinfo',
clientID: '<AUTH0_CLIENT_ID>',
redirectUri: 'http://localhost:3000/callback',