Skip to content

Conversation

@MatthewJamesBoyle
Copy link

A typical Spotify avatar URL is as follow:

https://scontent-ams4-1.xx.fbcdn.net/v/t1.0-1/c124.0.320.320a/p320x320/44594471_10217288278180083_8889099770203734016_o.jpg?_nc_cat=103&ccb=2&_nc_sid=0c64ff&_nc_ohc=wHUMWDX3V20AX-k8dIO&_nc_ht=scontent-ams4-1.xx&tp=27&oh=c91bd3a69375dfcc6811a75dcb5c3234&oe=5FD3FCAA

This is 264 characters long and so this db schema does not work and you get an error. Upping the character count for image URL solves the problem.

A typical Spotify avatar URL is as follow:
```
https://scontent-ams4-1.xx.fbcdn.net/v/t1.0-1/c124.0.320.320a/p320x320/44594471_10217288278180083_8889099770203734016_o.jpg?_nc_cat=103&ccb=2&_nc_sid=0c64ff&_nc_ohc=wHUMWDX3V20AX-k8dIO&_nc_ht=scontent-ams4-1.xx&tp=27&oh=c91bd3a69375dfcc6811a75dcb5c3234&oe=5FD3FCAA
```

This is 264 characters long and so this db schema does not work and you get an error. Upping the character count for image URL solves the problem.
@vercel
Copy link

vercel bot commented Nov 12, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nextauthjs/next-auth/55r8n51lp
✅ Preview: https://next-auth-git-patch-1.nextauthjs.vercel.app

@vercel vercel bot temporarily deployed to Preview November 12, 2020 14:55 Inactive
@ndom91
Copy link
Member

ndom91 commented Dec 6, 2020

@MatthewJamesBoyle did you also modify this in your db locally?

If so, maybe add the length: 300 option to the actual model definition here as well: https://github.com/nextauthjs/next-auth/blob/canary/src/adapters/typeorm/models/user.js

In which case, do you mind modifying the documention for the schema for mysql and mssql as well (same folder as your modified postgres.md file)?

Thanks!

EDIT: Theres another PRs open addressing this same issue (#777) - the going suggestion is to change the field from varchar to text

@ndom91 ndom91 changed the base branch from main to canary December 6, 2020 18:41
@ndom91 ndom91 changed the title Update postgres.md so the instructions are fit for Spotify as a provider. update(docs): postgres.md so the instructions are fit for Spotify as a provider. Dec 6, 2020
@vercel vercel bot temporarily deployed to Preview December 6, 2020 19:07 Inactive
@balazsorban44
Copy link
Member

Fixed through #777

@nonnuocvietip

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants