Skip to content
Discussion options

You must be logged in to vote

Olá galera, estou tendo o mesmo problema por aqui.

Só complementando, o método ConfigureAuthentication(builder) usa a chave JWTKey mas esse valor ainda não foi lido do app settings porque essa leitura só é feita no método LoadConfiguration(app).

Aqui está o erro quando tento rodar o projeto:

Ao tentar inverter os métodos e chamar o LoadConfiguration antes do ConfigureAuthentication, obtenho um erro dizendo que não é possível modificar as services depois que o app foi buildado: "Cannot modify ServiceCollection after application is built.".

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@rafaferreirasantos
Comment options

@andrebaltieri
Comment options

@marianohexsel
Comment options

Comment options

You must be logged in to vote
1 reply
@andrebaltieri
Comment options

Answer selected by andrebaltieri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants