nextjs `.env` on Amplify (πππππ)2022. 1. 21.
- next-authλ‘ auth λ₯Ό μ΄μΌμ μΌν νλ‘μ νΈλ₯Ό μ°ν리νμ΄μ λ°°ν¬ν΄λ΄€μ
signIn
μ μλ²μλ¬ λ°μ- error message was like this:
https://next-auth.js.org/errors#client_fetch_error Unexpected token < in JSON at position 0 {error: {β¦}, path: 'providers', message: 'Unexpected token < in JSON at position 0'}
https://next-auth.js.org/errors#client_fetch_error Unexpected token < in JSON at position 0 {error: {β¦}, path: 'providers', message: 'Unexpected token < in JSON at position 0'}
- μμ보λ amplify web uiμμ μ λ ₯ν env varκ° μλ¨Ήλ κ²μ΄μμ
- amplify.ymlμ μλμ κ°μ μ§μ νλ μ λ°μ μμμ
- echo "NEXTAUTH_SECRET=$NEXTAUTH_SECRET" >> .env - echo "NEXTAUTH_URL=$NEXTAUTH_URL" >> .env