You are not logged in.
Pages: 1
Hello, I need advice on how to remove the app token. Every time I delete it it gets restored. GLPI version 10.0.7. Thank you for your advice.
Last edited by jiritomanek85 (2023-05-17 10:38:55)
Offline
Where are you deleting this token?
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
Hi tried delete token via WEB interface in General settings. Everytime i tried to delete and safe. Token regenerate to new one.
Offline
The only place those tokens exist are within the API Client configuration. You cannot delete the tokens permanently, only regenerate them. What are you trying to accomplish by deleting them?
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
Because I want to start a GAPP app on android. When I login to the GAPP on android via username/password it reports an error:
ERROR_APP_TOKEN_PARAMETERS_MISSING connecting to GLPI API
According to their instructions it says to clear app_token.
https:// tic.gal/en/error_app_token_parameters_missing-connecting-to-glpi-api/
So I try it and it doesn't work.
Here they write that GAPP does not support app_token, so it must be deleted.
https:// tic.gal/en/how-to-setup-glpi-api/
So I don't know where to look for a bug or settings to get it to work.
Last edited by jiritomanek85 (2023-05-15 14:23:33)
Offline
That doesn't make any sense to me (for the apps to not support it), and I didn't realize that it should even be possible to connect without an app token (after looking in the code, apparently it is).
It looks like a bug was introduced when the UI was moved to Twig.
https://github.com/glpi-project/glpi/pull/13886
I've opened a pull request with a fix:
https://github.com/glpi-project/glpi/pull/14713
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
Here I have the answer from the ticgal/gapp github. When I described the problem to him again.
Hi,
I did some testing, and now I see what your problem is.
Apparently, once the app_token is enabled, it cannot be wiped out. I wonder if this is a bug or a feature .
However, you can delete the API client and create a new one to avoid the issue.
Regards,
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
-------------------------------
Thank you for your help.
I guess I'll have to wait until the problem is solved.
Offline
Sadly app_token is created automaticly with new API client. You can't even remove the localhostl imit of the default API client as clicking on Save will generate API token automaticly.
Offline
As I said in my last reply, this is indeed a bug introduced in a recent 10.0.X version. I linked to a patch that will be included in the next release that fixes this behavior.
Essentially, the issue was that the value of the checkbox for regenerating the token was always being evaluated as if it were checked.
After the patch, the token is only regenerated when the checkbox is selected.
Yes, by default when creating a new API Client the checkbox will be selected to ensure the token is generated as that is considered the "best practice". However, after the patch you are free to uncheck the box or go back in after the client is created and delete/change the token field freely.
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
OK Thank you for your help.
Offline
HI I have applied the patch and it is working now thank you for the information.
https: //github.com/glpi-project/glpi/pull/14713
Hi,
Apparently the problem is from GLPI. You should patch or wait until GLPI 10.0.8.
glpi-project/glpi#14713
Regards,
Offline
There are only two changed lines in the patch, so the easiest method is to just make the changes manually.
Go to the "Files changed" tab in the pull request and you can see which files and lines are changed.
In the future, for more advanced changes, you can add ".patch" to the end of the pull request URL like this:
https://patch-diff.githubusercontent.co … 4713.patch
That will give you the raw patch file which you can save and apply using a utility like "patch" on Linux.
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
Pages: 1