Clerk Auth Redirect/Reload Loop

I am currently looking into alternative forms of user authorization and authentication. Among the solutions I am looking into is Clerk. It’s pretty sweet and has a lot of cool features baked in. (Although the MFA support is a premium add-on and they aren’t super upfront about that).

One of the issues I ran into while implementing Clerk was a redirect loop. I set my home page within the Clerk Dashboard and when I reloaded my app, boom REDIRECTION FOR DAYS. Clerk was continuing to reload the home page for all eternity.

So, I added an onbeforeunload event into the page with a debugger call inside of it. This paused the page in the inspector before it reloaded and allowed me to actually see what was going on.

It turns out that Clerk was outputting an error message into the console. This error message is pictured below:

Clerk Error Message in JS Console

The <SignUp/> and <SignIn/> components cannot render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the Home URL instead. (This notice only appears in development)

? Clerk

Well – ok then. Clerk is redirecting to the Home URL (which is the one it’s already on) and causing a permanent redirect loop. It seems like this would be handled better by simply _not_ loading the SignIn or SignUp components should the conditions for their existence fail.

Hopefully this helps you out! You might consider making your home page and your sign in pages different pages, or conditionally load those components, so that Clerk can be happy and not mess things up.

Turn off Google Chromes “Switch To Tab” Feature

When I’m browsing, I tend to use tabs a lot. I clean up my tabs when I’m done with them, and I open new ones when I want new ones.

Recently, Google Chrome, introduced a feature which attempts to fix issues of tab proliferation by offering a “Switch to Tab” feature. This feature shows up in the Omnibar when you start typing something in the Omnibar that is similar to a tab you already have open.

It’s an interesting idea, but not useful to me. I find that it negatively impacts my experience using Chrome. Things that use to work (example, right arrow copies selected tab url into current url bar) don’t work with Google Chrome’s new “Switch to Tab Feature”.

I like to think I’m knowledgeable and responsible enough to switch tabs when I want to switch tabs, and open new tabs when I want to open new tabs. That said, I’ll be disabling the “Switch To Tab” feature.

To disable the “Switch to Tab” feature in Google Chrome first find the omnibox-tab-switch-suggestions flag in the Chrome flags menu. (Psst: it’s here: chrome://flags/#omnibox-tab-switch-suggestions). Then… select “Disabled” from the dropdown options.

Restart Google Chrome and you should be free of that annoying “Switch to Tab” feature ??

Hide the Action Center Icon in Windows 10

It’s the little things in life that annoy me. Things like Microsoft’s Edge browser icon re-appearing on my taskbar. Or, when Windows decides to update just before a meeting. I find these kinds of things to be very annoying. That’s why I was a smidgen irked when the Windows 10 Action Center icon popped up on my taskbar and showed no signs of leaving peacefully.

For those of you who do not know what the Action Center Icon in Windows 10 is then allow Leonardo to enlighten you.

Windows 10 Action Center Icon
aRGGG win10 icon, I’ll kill you!

And only now, at the end, do you see your mistake.

Remove the Action Center Icon

Now that we are all aware of the horribleness that is this awful Action Center icon we can set off on our quest to destr… err remove it.

  1. Open the Windows menu
  2. Search for Turn system icons on or off **
  3.  Find the Action Center icon.
    1. If you are not sure where the Action Center icon is, let the WoW splash screen show you.

      Turn system icons on or off list
      DESTROY…
  4. Turn if off
  5. Rejoice in the boundless fruits of your labor.

**Alternatively, if you are old school and hate things like convenience, you can navigate to this setting section via the Control Panel. So hop on in your Conestoga Wagon and navigate to Control Panel > Appearance and Personalization > Taskbar and Navigation > Turn system icons on or off.

Discovery Benefits – A Frustrating Experience

What follows is my experience thus far with Discovery Benefits. This post is more of a frustration dump for me than anything else. Discovery Benefits administers the COBRA accounts for my previous employer. My experience with them thus far has been frustrating. Their website is: https://www.discoverybenefits.com/

Discovery Benefits runs very slow and has little knowledge about the internal workings of their organization.

I have contacted Discovery Benefits multiple times. Each time asking them to add a dependent to my COBRA plan. Initially I provided dependent information to them via their own forms. After I contacted my insurance provider I was informed that not only did Discovery Benefits enter my wife’s name incorrectly, but they also did not pass on my dependents information.

I called Discovery Benefits and talked to a COBRA representative. The representative looked through my file and found the information I originally provided. They did not have any idea why that information was not entered into their system. The representative informed me they were entering the information now. They told me everything should be resolved within 3-5 business days.

Nine business days later I contact my insurance company to confirm that my dependents have been added. Most of the information is correct, but they are still missing information about one of my dependents. The insurance company tells me that I need to call Discovery Benefits to add the dependent. (Which I’ve already done).

I call Discovery Benefits up again. The customer service representative tells me that they have all the information that they need from me. However, the internal department responsible for adding dependents has not added the dependent yet. I ask the representative for a reason why. The representative cannot give me a reason. The representative repeats that “for some reason” the dependent has not been added. The representative tells me that they will add a note to my account about this issue.

I call Discovery Benefits back. I ask to talk to the department responsible for adding dependents. The representative does not know what I am talking about. I have to explain to them. There is a department within Discovery Benefits responsible for adding dependents to COBRA accounts. I then explain to them that one of my dependents has not been added and I want to talk to someone who can tell me why. The representative tells me that I cannot talk to that department. The representative still cannot give me a valid reason why the dependent has not been added. They continuously repeat “for some reason”. When I ask to talk to someone who knows what’s going on, the representative tells me that there is nobody I can talk to who knows what is going on. They communicate to me that the best that can be done is to add a “prioritized note” to my account.

Discovery Benefits - Delighted Customers
Not so much

To summarize. Discovery Benefits does not know what is going on. They cannot connect me to somebody who knows what is going on. And furthermore, there is nobody at that company who knows what is going on.

The best that Discovery Benefits can do for me is to add a prioritized note to my account. I am stuck. All I can do is hope that somebody sees this note and chooses to address it.

Discovery Benefits has proven that it is not capable of providing satisfactory service or information.

Password Protect a WordPress Subdirectory with .htaccess

There are questions all over the internet regarding how to password protect a sub-directory when you are using WordPress.

I just spent a long time fighting a frustrating battle with this as well. So I’m documenting the resolution here for my (and anyone’s) benefit.

 In short

  1. WordPress does not mess with requests to actual directories or files.
  2. If WordPress is messing with your request then you aren’t requesting an actual directory or file.
  3. It’s likely your Error codes aren’t setup to return actual files.
  4. Make sure your .htaccess file isn’t generating 500 errors (i.e. ensure the path to your .htpasswd file is correct).

Problem

I’ve added a .htaccess and .htpasswd file but all I see is a WordPress 404 page. I can’t stop crying because it’s not working and my brain hurts.

Yep. That happens. WordPress comes with the following .htaccess file by default:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Let’s break this down.  First we are checking if the mod_rewrite module is even installed. If it is then we are turning the RewriteEngine on. That’s all great. We wouldn’t want to use the engine if it didn’t exist… right?

RewriteBase / – This sets the base of every subsequent Rule and Condition to the root `/`.  This way we don’t have to include the root directory at the beginning of any of our rules.

RewriteRule ^index\.php$ - [L] – This rewrite rule checks to see if we are on the index.php page already. The dash in the rule means do nothing. So… if we are already on index.php don’t do anything. The [L] option means that we should stop processing rules now. Don’t do anything else, we’ve got what we wanted. Quite literally this is the [L]ast rule that should be processed.

RewriteCond %{REQUEST_FILENAME} !-f – This condition makes sure that if the current request is hitting an actual existing file then we should do nothing. So WordPress won’t mess with your requests if you try to link to an actual file.

RewriteCond %{REQUEST_FILENAME} !-d – This condition makes sure that if the current request is hitting an actual existing directory that we should do nothing. So WordPress won’t mess with your requests if you try to link to an actual directory.

RewriteRule . /index.php [L] – Finally, if our request passed the above two conditions (it’s not an actual file and not an actual directory) then map the request to index.php. Now the request is mapped and WordPress can do its thing!

That’s Great But…

I know what you are thinking. You are thinking:

If what you are saying is true, then I shouldn’t be seeing a 404 page. My password protected directory actually exists!

Yes. You are correct, your directory does exist.

Solution

When you password protect a directory with .htaccess you are telling the server to return a certain response code. The 401 response code meaning the user is unauthorized, to be precise. When the browser received this response code it triggers a username and password prompt. However, and here is the problem, the browser is never receiving the response code.

Why is the browser not receiving the response code?

Good question. If you remember the WordPress .htaccess checks if the requested url points an actual file or directory. It only rewrites you to the index.php file if you aren’t actually requesting a file or directory. When you throw the 401 response code you aren’t actually requesting a file or directory. You are essentially requesting nothing (because you are unauthorized). So the WordPress .htaccess file is behaving correctly – it’s rewriting you to the index.php page and giving you a 404 (because more than likely your password protected directory does not match a permalink on your WordPress blog).

So… if WordPress is making sure that you actually requested a file then… you need to make sure that you are actually getting a file! You can do this by adding the following line to the top of your WordPress .htaccess file:

ErrorDocument 401 default

What you are doing is telling the server to return the default 401 file when it encounters a 401 response code. Once you are returning an actual file WordPress won’t try to grab your request.

Ok. I added that and I’m still having issues. What gives?

If you are like me, then the 401 response code fix wasn’t enough. You are still having the same issue and by now you are wanting to… oh gosh I can’t even think of anything to describe this type of pain.

Let’s look at our .htaccess file we are using to password protect our sub-directory. If you are anything like me your file might’ve looked something like this.

AuthType Basic
AuthName "Password Protected Area"
AuthUserFile /public_html/jeremysawesome.com/mySecretDirectory/.htpasswd
Require valid-user

This looks perfectly valid to me. However, it turns out this file is generating Internal Server Errors!  (I know because I added a ErrorDocument 500 default line to my WordPress .htaccess file just for kicks.) But this shouldn’t be generating a 500 error unless I’m doing something wrong.

Turns out. I was.

The AuthUserFile argument needs to be the full server path to your .htpasswd file. Turns out, /public_html wasn’t actually the beginning of my server path. As a result the server was throwing a 500 error. Once I figured out what my entire full server path was, and added that to my .htaccess file, everything started working.

To Recap

  1. WordPress does not mess with requests to actual directories or files.
  2. If WordPress is messing with your request then you aren’t requesting an actual directory or file.
  3. It’s likely your Error codes aren’t setup to return actual files.
  4. Make sure your .htaccess file isn’t generating 500 errors (i.e. ensure the path to your .htpasswd file is correct).

Whew! Thank goodness that’s over. Happy Blogging 🙂

Disabling the Avatar Menu in Google Chrome

I’ve recently noticed a tiny little button show up in the top right hand corner of Chrome next to the “Close”, “Maximize” and “Minimize” buttons. This button is for Google Chromes newish “Avatar Menu”.

It looks like this:
Google Chrome Avatar Menu

Since I don’t typically like new things.. I immediately went looking for a way to make it go away.

That said, you can use Chrome flags to turn off the avatar menu in Google Chrome.

  1. Open the Chrome flags by typing “chrome://flags/” into your Omnibar.
  2. Search through the flags for “Enable the new avatar menu
  3. Select the “Disabled” option and save.
  4. Relaunch the browser.

Kaboosh. The new Avatar menu is gone (for now).

My Computer Updated Itself to Windows 8.1 Today

The Windows 8.1 experience that I’ve shared below is just that, an experience. Windows 8.1 itself is fine, I’d prefer if it gave me more customization options. Personally, I’d prefer not having a Windows button (I’ve got a windows key on my keyboard). Personally I’d prefer full screen search over the tiny search bar in 8.1. So Microsoft would’ve done better to provide personalization options, not to choose for you.

And I’m a little ticked off.

First off, my computer updated itself without my knowledge nor my permission. It had asked me a few times, to which my answer was always “Not Right Now”. However, it decided, of it’s own accord, that it would update itself. That kind of behavior is not acceptable.

In addition to updating itself to Windows 8.1 it also decided that it would be helpful and download/setup/install a bunch of apps for me. Once again it did so without asking for my permission. It then decided that it wanted me to create a special Microsoft Account to use my personal computer, Luckily, I found a way around that (using my smartphone, because my computer wouldn’t let me use it).

When I finally got into the computer I discovered that it had changed a number of things that I did not tell it to.

  1. It Rearranged my taskbar icons.
  2. It added a Start Button
  3. It threw Internet Explorer onto my taskbar
  4. It changed the way I search for things in the start menu.
  5. It changed the way my start menu looked.

All in all, I wasn’t that happy with the way Windows 8.1 decided to force itself upon my machine.

A few tips for the future.

  1. Do not update my machine without asking me
    1. If I tell you to wait, then you better wait and you better not update without me.
  2. Do not *force* me to make a Microsoft Account to use my own computer.
    1. Make the fact that it’s *optional* more clear.
  3. DON’T CHANGE MY STUFF
    1. I have icons on my taskbar for a reason, don’t mess with them
    2. Don’t try to trick me to use IE by placing it in prominent places on my machine
    3. Don’t add things without asking me
    4. Don’t change things without asking me
  4. It disabled my PS3 controller(that I spent a long time trying to get to work on my computer).

This whole process would’ve been a whole lot less frustrating if it allowed for more input from the user. It should’ve told me about all the changes it wanted to do (add IE, add the Windows button, modify the Startmenu), and more importantly, it should’ve given me the option to keep things the way they were.

So… now I proceed to search the internet for ways to make my computer the way I like it again. Which makes me even more frustrated.

**UPDATE**

It appears there is no built in way to turn off the Windows button in the taskbar. There is also no way to make my Start Screen searches full screen by default anymore. (Ok, so if I actually click the apps view, and then search, the search is the way I want it to work). The only way to get these things back to the way I like them is by re-installing windows 8, which is pretty annoying. All in all I’m really sad with the way this whole update happened.

Note:

Kaira mentioned that she’s been postponing the update by doing the following. Maybe that will help some of you.

What I do is, when the prompt asking to restart at a time of my choosing sets, set it to as late as it goes, then rush over to the Windows Store. Click Updates (top right) and you’ll see it downloading 8.1. Click that and something at the bottom comes up, and you can select Cancel.

URF! Ultra Rapid Fire mode needs to come back!

URF Login on April 1
URF Login on April 1

Riot introduced Ultra Rapid Fire mode into League of Legends on April 1 as an April fools joke. However, the community saw it as far less than a joke. The reasons that Riot gave for introducing URF included aboloshing “anti-fun”. I think they were on to something.

Here are the basics that were granted in Ultra Rapid Fire mode:

  1. Mana and Energy costs were removed (no need to manage that resource).
  2. Ranged champions attackspeed increased by 100%.
  3. Every champion begins the game with 80% cooldown reduction on abilities and spells.

This handy tool tip explains the gist of it:

The only way to play League anymore.
The only way to play League anymore.

There were some additional features I liked, movement speed was increased, so I didn’t have to buy boots every single game.

I played URF everyday since April 1st when it came out. I was very happy that (after the community begged and begged) Riot extended it for another week. But, alas, Riot ended it last night, April 13. I played one last game with ‘Vi’ which we won, and waved goodbye.

At the time I thought that everything would be fine. I’d go back to playing normal mode and it’d be just as fun as it was before. This morning I logged in and played a match with Vi on the Twisted Treeline map. It was very disappointing.

The movement speed was too slow, even with Boots of Speed. Waiting for cooldowns to proc was annoying. It took forever to build any items (even on Treeline). I was overwhelmed with a feeling of general frustration. The game had become less fun.

It used to be that I looked forward to playing League of Legends. However, when I think about playing League of Legends now I just feel extremely disappointed. I don’t really want to play anymore. It’s not that the game is bad, it’s a good game. But, after seeing how fun it could be it’s just not as interesting anymore.

Other people have noticed the same thing. The community is longing for URF to come back. Notice some of the response.

So with that said, I think I’m going to be taking a break from League of Legends. It’ll give me some time to finish some other games I’ve been needing to finish, like Tomb Raider 2013. Maybe I’ll come back later refreshed and find the game to be fun again. Maybe I’ll get fed up and program my own URF mode game. Or… maybe it is just time to say goodbye.

Taco Bell Removes the Enchirito from Menu

**EDIT 09/20/2013 **

I recently went back to Taco Bell. As it turns out they have put the Enchirito back on the menu. When I asked why, they told me that a lot of people were unhappy and wanted it back. So good work people!

**END EDIT**

Oh Taco Bell. You have done this to me before and you are doing it to me again. When are you going to learn that taking things off your menu is a BAD thing? It is especially bad when you “take” something off the menu and replace it with the same thing albeit more expensive.

A couple of years ago Taco Bell removed the Nacho Cheese Chalupa from it’s menu. (It was probably a couple of years ago although it could’ve been more recently). This made me mad. Let me tell you what I say when I order from Taco Bell. “Hi Taco Bell Person, I’d like 2 bean burritos, a Nacho Cheese Chalupa and an Enchirito”. That’s it! That is what I always had. So imagine my surprise when one day I say my normal order and the response from the other end is “We don’t sell Nacho Cheese Chalupas anymore.” And so I said, “What?…”.

What?...
What?…

Well that was a bad day. But I quickly learned how to get around it by being a super annoying customer. That’s right, my future orders went a little like this.

I’d like two bean burritos, a Nacho Cheese Chalupa, and an Enchirito please.
We don’t sell Nacho Cheese Chalupa’s anymore.
Oh really…? Hrmmm. Well then I would like a Supreme chalupa with no sour cream.
No sour cream?
Yes. No sour cream. Oh and can you add Nacho Cheese to that too?
A Supreme Chalupa with no sour cream and nacho cheese?
Yes.

So, in case you are wondering how to get a Nacho Cheese Chalupa, that’s how.

So… same story no happy ending yet. Today I go to Taco Bell and I order my order. This time they say “We don’t sell enchiritos anymore”. And so I said “What?…”

What?...
What?…

So, as it turns out, they are selling Enchiritos, they’ve just renamed them and made them more expensive. They are now called “Smothered Burritos” and they come with Sourcream on them in addition to the normal stuff. Can you say argggggg? I can. You should try it, I think you probably could.

I’m sure I’m not the only one who thinks it’s LAME to rename an item on your menu and make it more expensive. Then again I guess they can do what they want to do… be stupid.