ticgal / gapp

Bug reporting for Gapp
https://tic.gal/gapp/
4 stars 2 forks source link

[Problem with app_token] #61

Closed jiritomanek85 closed 1 year ago

jiritomanek85 commented 1 year ago

He wanted to start a GAPP app on android. When I log in to GAPP it reports an error ERROR_APP_TOKEN_PARAMETERS_MISSING connecting to GLPI API

According to your instructions I have to delete the app_token. https://tic.gal/en/error_app_token_parameters_missing-connecting-to-glpi-api/ So I try it and it doesn't work. I cannot leave empty app_token.

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.

jiritomanek85 commented 1 year ago

Yes a quick google search will find an article saying how to work around the bug. But when I follow the instructions I can't disable/delete app_token so that it is empty.

Moreover, you write that the app does not support app_token. So how do I set it up in your app to make it work for me? We have version 10.0.7 GLPI.

OscarBeiro commented 1 year ago

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,

jiritomanek85 commented 1 year ago

I've tried deleting the API and re-creating a new one, but unfortunately without success I still get the token error in your app.

Příjemný den Ing. Jiří Tománek

------ Původní zpráva ------ Od "Oscar B." @.> Komu "ticgal/gapp" @.> Kopie "jiritomanek85" @.>; "Author" @.> Datum 15.05.2023 17:00:35 Předmět Re: [ticgal/gapp] [Problem with app_token] (Issue #61)

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 https://github.com/ticgal/gapp/issues/61#issuecomment-1548033307, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVB7VYXCMBHCUX3GNBWVLTXGJAJHANCNFSM6AAAAAAYCDZGXQ. You are receiving this because you authored the thread.Message ID: @.***>

OscarBeiro commented 1 year ago

Sorry, but this is something related to GLPI or your particular GLPI instance, not to Gapp.

jiritomanek85 commented 1 year ago

I don't understand how this can work in version 10.0.7 and GAPP. Because GAPP support says to use it with an empty API token. On the other hand, GLPI does not allow an empty API token.

I don't know how it works. But it probably works because the only problem I have is probably me...

Příjemný den Ing. Jiří Tománek

------ Původní zpráva ------ Od "Oscar B." @.> Komu "ticgal/gapp" @.> Kopie "jiritomanek85" @.>; "Author" @.> Datum 16.05.2023 9:34:23 Předmět Re: [ticgal/gapp] [Problem with app_token] (Issue #61)

Sorry, but this is something related to GLPI or your particular GLPI instance, not to Gapp.

— Reply to this email directly, view it on GitHub https://github.com/ticgal/gapp/issues/61#issuecomment-1549150352, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVB7V7YMKYXQCA55Y6T5NTXGMUX7ANCNFSM6AAAAAAYCDZGXQ. You are receiving this because you authored the thread.Message ID: @.***>

OscarBeiro commented 1 year ago

Hi, Apparently the problem is from GLPI. You should patch or wait until GLPI 10.0.8. https://github.com/glpi-project/glpi/pull/14713 Regards,

jiritomanek85 commented 1 year ago

HI I have applied the patch and it is working now thank you for the information.

Příjemný den Ing. Jiří Tománek

------ Původní zpráva ------ Od "Oscar B." @.> Komu "ticgal/gapp" @.> Kopie "jiritomanek85" @.>; "Author" @.> Datum 16.05.2023 16:05:33 Předmět Re: [ticgal/gapp] [Problem with app_token] (Issue #61)

Hi, Apparently the problem is from GLPI. You should patch or wait until GLPI 10.0.8. glpi-project/glpi#14713 https://github.com/glpi-project/glpi/pull/14713 Regards,

— Reply to this email directly, view it on GitHub https://github.com/ticgal/gapp/issues/61#issuecomment-1549747321, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVB7VZQXO7MINBMT2EPVX3XGOCS3ANCNFSM6AAAAAAYCDZGXQ. You are receiving this because you authored the thread.Message ID: @.***>

uelitonl commented 1 year ago

Hi jiritomanek85. I've changed both files, authentication.html.twig and APIClient.php in my GLPI but it dosen't work. Can you help me? I'll apreciate so much. Di you anything else? Thanks !