Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue obtaining SSO Token #36

Closed
arminkmbr opened this issue May 21, 2020 · 9 comments
Closed

Issue obtaining SSO Token #36

arminkmbr opened this issue May 21, 2020 · 9 comments

Comments

@arminkmbr
Copy link

arminkmbr commented May 21, 2020

Hey,
I have issues obtaining the SSO Token as when i try to initialize with --init --sso i get through up to the part where i have to copy the page that didnt load. I dont get any not loading pages in my developer network window. I just get two 404s with one being the weppage itself and one being a background image. Every other request is ok(200). All I get from the network tool is a sess key. But i dont know what type of input the script expects? Can someone help me obtaining the SSO Token manually and get it to initialize?

Moodle Version is 3.83
It would also immensely help if someone knows the url its expecting there.

Thank you.

@C0D3D3V
Copy link
Owner

C0D3D3V commented May 21, 2020

First off all look at this for details: #4 (comment)

@C0D3D3V
Copy link
Owner

C0D3D3V commented May 21, 2020

Try to use the displayed url but without the urlscheme part

@C0D3D3V
Copy link
Owner

C0D3D3V commented May 21, 2020

Like this :
https:// + moodle_domain + moodle_path + /admin/tool/mobile/launch.php?service=moodle_mobile_app&passport=12345

C0D3D3V pushed a commit that referenced this issue May 21, 2020
@C0D3D3V
Copy link
Owner

C0D3D3V commented May 21, 2020

Sorry for the late answer, in Germany today is a national holiday.

@C0D3D3V
Copy link
Owner

C0D3D3V commented May 21, 2020

The script expects a URL that looks like this:
moodlemobile://token=$apptoken.
Where $apptoken is something random looking, in fact it is a Base64 encoded hash and the token and other meta data.

C0D3D3V pushed a commit that referenced this issue May 21, 2020
@C0D3D3V
Copy link
Owner

C0D3D3V commented May 21, 2020

Thanks for your feedback I have made a few adjustments, I hope they help.

@arminkmbr
Copy link
Author

That reply was actually pretty quick. Im from Germany as well :)
I just tried it without the URL scheme but it still does not show me any other page thats not loading.
I'll upload a screenshot.
(They're with the URL scheme but without the URL scheme i get 'Das Plugin ist nicht aktiviert oder nicht richtig konfiguriert.' as an error)

Am I doing something wrong?

1
2

@C0D3D3V
Copy link
Owner

C0D3D3V commented May 21, 2020

Try to set the urlsheme to something random like urlscheme=downloader.
If this does not help, then unfortunately no token creation is activated for the moodle. I have seen this before with Moodles that have sso activated. This can be easily tested by testing the moodle app on android or ios.

You can also write to the admin. I have already done that, either they simply forgot it or they explicitly do not want to use the moodle app yet. In Dortmund for example, I wrote to the admin and he answered that they are still discussing whether they will allow the moodle app this year.

If the Moodle app does not work, this downloader will not work either. Because the admins must allow any external API access and only the Moodle app is enabled, if at all. By default the bot pretends to be a Moodle app (But it can be adjusted.).

My old moodle donwloader unfortunately won't do you much good either, because your Moodle is already on version 3.8.3 and therefore the downloader is a bit confused about the file structure. But you are welcome to test it.

@arminkmbr
Copy link
Author

Thank you very much for your time. I will try writing the admin.
Have a great evening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants