1.2.4 • Published 3 years ago

coda-auth v1.2.4

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Next.js + Authentication

WARNING

This does not use dynamic values. This is currently for personal use and has values hardcoded for my setup. You probably should be using npm next-auth instead. Please do use this in anykind of production environment. That being said you can follow through my edits if you want to fork a version for yourself.

Purpose

Fork of npm next-auth which used a runtime environment variable of NEXTAUTH_URL to determine base url of authentication. When using the serverless-next.js Severless Framework Component it will be deployed at Lambda@Edge. This does not allow the use of adding environment variables and thus conflicts with the way next-auth handles routing. This package instead searches the lambda name for occurances of -prod- or -dev- and will pick a static base url from that. Where does it get the static base url? It is hardcoded right now. So, you probably should avoid this package unless you too want to fork and hardcode.

List of Edits

  1. created /dist/config.js
  2. specified a personally used url to become the export when lambda@edge -prod- or -dev- is found in the lambda name
  3. import this config into /dist/client/index.js a. any mentions of process.env.NEXTAUTH_URL will now also search for a url from this config
  4. import this config into /dist/server/index.js a. any mentions of process.env.NEXTAUTH_URL will now also search for a url from this config

Future

This package needs extensive testing and should be made more dynamic. Setting the baseUrl in the options of ...nextauth.js should be possible.

1.2.0

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.38

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.26

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.29

3 years ago

1.0.28

3 years ago

1.0.27

3 years ago

1.0.33

3 years ago

1.0.32

3 years ago

1.0.31

3 years ago

1.0.30

3 years ago

1.0.37

3 years ago

1.0.36

3 years ago

1.0.35

3 years ago

1.0.34

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago