Discourse Community Authentication

The DCA extension, short for Discourse Community Authentication, is my first open-source extension! Over the next few weeks you will see many improvements to code and a great amount of customization! If you come across errors, please file an issue report as I did make this in two-three days.

Please respect my wish that you do not take a snippet from this extension, create a one-block extension for yourself, and then not use my extension. More customization will come in the future, just be patient <3

Documentation or (The Hub / Assets / com.github.sharkphin.dca.aix) Download!

Edit

Issue has been fixed. Thank you for your patience.

13 Likes

Great work!

1 Like

Nice Work!

1 Like

Great work

1 Like

@SquishyOctopus I really don’t understood the use/purpose of this extension. Is it like fb authentication or it will authenticate users who are using discourse.

Could you or anyone explain me :sweat_smile:

1 Like

It provides an easier way to get someone to grant you access to their profile on the community using the Discourse API. Certain routes will require a User API Key and some will require an Admin API Key (which can only be generated from the Admin Dashboard). This extension makes it easier to get the User API Key to use for the Discourse API if need be.

4 Likes

Nice extension

1 Like

I haven’t touched on this extension topic in a few months, but I have been working on improvements BTS. I came to do a survey of what you want to see, so that improvements can be made to the already done improvements based on polls.

The polls close at 11:59 PM today EST.

Should there be an option to make the authentication request show at the bottom of the screen? Sort of like a bottom sheet?

  • No
  • Yes

0 voters

How clear should the authentication request be?

  • Allow this to be toggled by the application developer
  • Show what access the application is being granted, such as “Access to account details”
  • Don’t show access being granted to the application, just “Example is asking for account access.” or something alike

0 voters

Should multiple accounts be allowed?

  • No
  • Yes

0 voters

Should checking whether one or more accounts be initiated by the application developer or extension developer?

*There will be an event to determine when this is finished.

  • Application developer; The check process can take place anywhere
  • Extension developer; The check process will take place when the current screen is initialized

0 voters

Should there be a way to get the current user (not just from an event)?

*This relies on your answer to whether multiple accounts should be allowed.

  • No
  • Yes
  • Yes, but also allow the application developer to get all saved users that have the ability to sign in

0 voters

2 Likes

Maybe a Kodular Community app for Android come out (without the Discourse App).

Thank you all for participating!

Final results

  • There will be an option to show the authentication request at the bottom of the screen, like a bottom sheet.
  • How clear the authentication request should be, will be left up to the application developer. This might change according to country laws and API specifications.
  • Multiple accounts will be allowed.[1]
  • Checking how many accounts are on the device and which one is actively signed in if any will be left up to the application developer.[1]
  • There will be a way to get all saved accounts and the current user if one exists.[1]

1 In accordance with the Kodular Communities Staff Preferences and Kodular Community TOS, the ability to login with multiple accounts will be disallowed. It is best to show that this behavior is unacceptable and so it’s done in the best interests of both Kodular and the DCA extension itself. Thank you for your understanding!

1 Like

I voted on all the pie charts. Is this some kind of app you are developing?

1 Like

Nice work dear

Hello @John_the_Lego!

I made the survey to collect suggestions about what I should do for the Discourse Community Authentication extension in the future. And it is something I am looking into for other extensions of mine.

Possible memory leak

It has come to my attention that there is a possible memory leak while the authentication activity is visible and possibly even afterwards. Be aware that if performance has degraded for older Android versions, I recommend you remove DCA from your application and wait patiently while a fix is being developed.

This memory leak is only possible because I am not sure how well, or if at all MemoryLeakUtil.java from AI2 works. It is better to be safe, than sorry.

appinventor-sources/MemoryLeakUtil.java

Stop using DCA

After further investigation into the issue, I’ve concluded that this is in fact a memory leak, and no longer just “possible.” It’s recommended that you stop using DCA as performance may degrade for older Android versions.

1 Like