Legal question about Unions ???

Hey guys curious question about unions or at least if you ever in same situation.
My companies union with my promotion told us from the get go hey you guys are on probation and you have to pass all your classes and exams ok cool. Now you have to give us $xxx check for initiation now here is funny part. My company has different unions based on what your job is. My last union at same company we were told unions must have you sign paper acknowledging that u pay a due every month out of ur check and u must pay initiation fee before you can be union member. If you don’t u can’t work here. Ok no prob. Without signing any papers saying we are in this Union Our first checks had union dues deducted without our authorization and we have not paid our initiation fees yet either. Last week the union rep came in to our class and said if u don’t have ur initiation by next week. We must escort you off property. Lmao. Also we were told they can’t represent us til we are out of class which is beginning of August but we must still pay them.

I wanted to know if this is actually legal Just curious. I don’t plan on taking legal action at all. Sounds to me like extortion. Lol.