Skip to content

Instantly share code, notes, and snippets.

View steven-tomlinson's full-sized avatar
💙

Steven Tomlinson steven-tomlinson

💙
View GitHub Profile
@steven-tomlinson
steven-tomlinson / passwordless-token-provider.md
Created June 11, 2022 13:29 — forked from ebicoglu/passwordless-token-provider.md
Implementing Passwordless Authentication in ASP NET Core Identity

Implementing Passwordless Authentication in ASP.NET Core Identity

To allow a user login with a magic URL, you need to implement a custom token provider. I'll show you how to add a custom token provider to authenticate a user with a link.

Step-1

Create a class named PasswordlessLoginProvider in your *.Web project.

PasswordlessLoginProvider.cs

@steven-tomlinson
steven-tomlinson / dydxFlashLoanTemplate.sol
Created May 23, 2022 10:50 — forked from cryptoscopia/dydxFlashLoanTemplate.sol
A single-file simplest possible template for a contract that obtains a flash loan from dydx, does things, and pays it back.
// SPDX-License-Identifier: AGPL-3.0-or-later
// The ABI encoder is necessary, but older Solidity versions should work
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
// These definitions are taken from across multiple dydx contracts, and are
// limited to just the bare minimum necessary to make flash loans work.
library Types {
enum AssetDenomination { Wei, Par }