When using a custom application model migrations don't work out of the box. The `makemigrations` command should fail with an error like: ``` ValueError: Lookup failed for model referenced by field oauth2_provider.Grant.application: foo.MyApp ``` Let's say you have your custom user model in `foo.MyApp`, follow these steps to correctly create migrations for your app: 1. Check you **DON'T** have `OAUTH2_PROVIDER_APPLICATION_MODEL` in your settings or it is commented out. 2. Check both `oauth2_provider` and `foo` are listed in `INSTALLED_APPS`. 3. Run `makemigrations` command 4. Now add or uncomment `OAUTH2_PROVIDER_APPLICATION_MODEL`\ 5. Run `migrate` command.