Determine if logged in via iframe on a static jekyll blog - authentication

I am trying to build an e-learning style site similar to KhanAcademy.org. I'd like to be able to use Jekyll for the main site on www.mydomain.com. In addition, I'd like a logged in view for the user as well which would live on learn.mydomain.com. I am trying to figure out how to do a redirect on www.mydomain.com (jekyll blog) and redirect the user to the subdomain if they're logged in. The one approach I can think of is to embed an iframe, and assert if the user is logged in and then do a redirect..Not sure if that's possible or would I need to communicate with the jekyll blog using postMessage()?
I really like this setup as I can start creating static content in a nice way on the main site, and if the user decides to then create an account and/or subscribe (pay) they will be redirected to the logged in user experience which I can build on a separate stack (node, express, react). Appreciate the help and any ideas on how to implement this. I plan on using auth0 for the logged in experience.

Related

How do I password protect a website with static and dynamic parts?

I have a website on my personal domain that I would like to password protect securely. This website has two parts. One is a static website I have created with the SSG Eleventy and copied into the web directory. The other is an installation of MediaWiki. My site is hosted on Dreamhost shared hosting and is currently password protected with Apache .htaccess and .htpassword files for basic authentication. This is mostly fine, except for the fact that it isn’t easy to “log out”. I would like a way to password protect this site that gives me more control over logging in/out.
I want to be able to create my own log in page that looks more like the rest of the site (instead of the default Apache login page). I would also like there to be an easy way to create new users and passwords, though I want the ability to create new users to be restricted to the admin account (my login). I want users to be able to log out whenever they want, and have the site properly protected from any logged out users. I would like this password system to also protect the part of my site that is built with MediaWiki. This means that, if I navigate to a page within the wiki, I want it to redirect to the site-wide log in page, before allowing access to MediaWiki. Once the user logs in, they should have access to the whole site, including the wiki section without being prompted to enter the password again. (I am aware MediaWiki has its own login page, but I want to be able to use a single password for accessing the entire site. Also, I am NOT looking to integrate MediaWiki’s internal login with this site-wide login.)
I do not intend this site to ever have that many users. Really just me and a few others I want to invite (via their own username and password). So I really just need a simple way to manage these user accounts and prevent access to others.
What is the best way to do all this? Is it even possible to do any of this for a static website? I know I probably have to use php to make this work, which I don’t know too well, but am willing to learn. It also probably shouldn’t be too hard to create and manage a database to store the usernames and passwords if necessary. I would just like to know if all this is possible and what the easiest way to do it would be.
I am pretty new at web development and this is the first real website I have built and deployed. I would really appreciate any suggestions and help.

Redirect shopify app url to custom url

I have created an app in shopify and after installing it in the store, I want when I click on the app then it will redirect to other domain like www.abc.com instead of open it in the shopify admin.
I have checked this type of functionality in many apps but don't know how to implement it. Please help me to solve this issue.
Thanks
Firstly, you need to create account as Shopify partners. Once you sign-in in your account, you will see Apps on the left side of the dashboard. You will see Redirection URL in the options available. You can also give name and other details of your app in this session.
most likely your app is an embedded app that is why it is not opening new tab upon clicking from admin app listing. you first understand whether your app required embedding functionality or not.

Google OAuth2 for authentication redirect hangs

I've implemented a simple OAuth2 for Authentication login system that is working reliably on my dev server using a localhost redirect uri.
When testing from a production server, with updated redirect uri, the Google account permission interface opens up for the user logging in. After authorizing account access, the browser just hangs on "Waiting for accounts.google.com..." and doesn't go anywhere. At this point, I can see that the application has been granted access to my profile by viewing account permissions on my Google account dashboard.
If I change the redirect uri to an invalid one, I do get the invalid redirect uri Google error message back, so it looks like the redirection cannot reach my redirect uri. I can reach the reditect uri directly through a browser though. Any pointers?
Had a similar problem trying to create a "Login with Google" App. Since this was my first Google App, and I was also just first using the social networking setups in the software package which I bought BEFORE the Google API had changed, I was at a complete loss as where to start.
It finally dawned on me to redirect Google (via the App settings in the developer console) to a test web page on my site (instead of the page defined by the software package,) and all worked as expected, meaning Google redirected properly to the test page (which was actually just my root index.php). This told me that because the Google API had changed, my software package functionality was obsolete, and I needed to explore the code there.

Retrieving Page from HTTPS Website

I am registered user of a website that provides stock quotes values and I want to create a desktop application where in I will display the stock updates of a specific quotes.
For that, I need to parse a web page which is visible only when I login to the website. If I try to access that page, without logging in, it redirects me to the login page.
The Website does not provide any API for developing such a client application. Is there any way I can login to the website using the desktop client and thus access the required web page?
Regards,
TheLameProgrammer
You'll need to first do a HTTP POST to the login page, store the cookies that come back, then pass these along with any furture request you make.
Same as the browser does.
Hopefully this question is in earnest and not spam but the answer is no

How to achieve nice litle USER page url like facebook or twitter?

I have a .NET app and I let users to create their account.
Right now the user page looks like http:///user/?user=guru
I have a user subfolder at the app root and that is where the aspx pages for user page are
How can I let my users access their pages like twitter, facebook or youtube?
Their user profile\channel\account has this format: http://www.facebook.com/guru
This way the URL is short and easy to remember and share
Thanks
This is called "url rewriting". You have some code that takes the original “facebook.com/guru” URL and coverts it into the “facebook.com/?user=guru” URL before the hosting application tries to process it.
Depending on your web server, there is probably a module already built that lets you do this. In IIS, you can either use a custom HttpModule or the URL rewriting module.