softwerkab / fortnox-csharp-api-sdk

.NET SDK for Fortnox API.
MIT License
53 stars 65 forks source link

Remove legacy static authorization #221

Closed vanillajonathan closed 2 years ago

vanillajonathan commented 2 years ago

2021-12-09: End of life for the existing authorization flow with long-lived access tokens. All integrations must use the OAuth2 Authorization Code Flow with expiring access tokens.

https://developer.fortnox.se/blog/fortnox/

richardrandak commented 2 years ago

It was postponed to 2022-01-09.

The only thing what will happen is that you can no longer get a new static access token, but you can still use existing ones. Therefore the SDK should support it. So, I can delete the StaticTokenAuthWorkflow but not the StaticTokenAuth(orization)

xpagedeveloper commented 2 years ago

It was postponed to 2022-01-09.

The only thing what will happen is that you can no longer get a new static access token, but you can still use existing ones. Therefore the SDK should support it. So, I can delete the StaticTokenAuthWorkflow but not the StaticTokenAuth(orization)

The old way will work for existing setups until that token expires Fortnox says that that is aprox 10 years

richardrandak commented 2 years ago

@xpagedeveloper - But the activation (getting a new long-term token) should not be possible anymore even for old apps, right?

bpaolo71 commented 2 years ago

It is working for us :) We can still get a new long-term token.

xpagedeveloper commented 2 years ago

I know that Fortnox has keept it for some types of customers but officially it’s closed since 6/1 2022

CyrilPorseland commented 2 years ago

Same here, we can get new static access tokens and the lifetime of them is 10 years so let them be. Don´t remove anything from this excellent SDK 👍

andreassandin commented 2 years ago

Yes please keep it but i wonder why the StaticTokenAuthWorkflow does not have a Revoke function? Strangely it exists in the StandardAuthWorkflow with the name RevokeLegacyTokenAsync.

richardrandak commented 2 years ago

In that moment I thought the old auth class will be removed but revoke old access token should still be available, so I put it to new workflow class. Now it make sense to put it to StaticTokenAuthWorkflow.